Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSG-1082: Automate Comet Starter App E2E Testing #29

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/build-and-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Deploy
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Build and Deploy
run: npm run deploy
25 changes: 25 additions & 0 deletions .github/workflows/run-e2e-testing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Run End-to-end Testing
on:
workflow_run:
workflows: ['Build and Deploy']
types:
- completed
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node environment
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm run e2e:ci
198 changes: 198 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "comet-starter",
"homepage": "https://metrostar.github.io/comet-starter/",
"private": true,
"version": "1.0.0",
"description": "React and TypeScript starter app, pre-configured with the Comet component library and other tools.",
Expand All @@ -25,7 +26,9 @@
"e2e:ci:run": "rm cypress/reports/* || true && npx cypress run --reporter mochawesome",
"e2e:ci:report": "mochawesome-merge cypress/reports/*.json > cypress/reports/report.json && marge --reportDir cypress/reports cypress/reports/report.json",
"e2e:format": "npx prettier cypress --write",
"prepare": "husky install"
"prepare": "husky install",
"predeploy": "vite build --base=/comet-starter/",
"deploy": "gh-pages -d dist"
},
"dependencies": {
"@metrostar/comet-data-viz": "1.1.1",
Expand Down Expand Up @@ -65,6 +68,7 @@
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "0.4.3",
"gh-pages": "^6.0.0",
"husky": "8.0.3",
"jest": "29.6.2",
"jest-environment-jsdom": "29.6.2",
Expand Down
Loading