-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
170 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Validate | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- closed | ||
branches: | ||
- master | ||
|
||
env: | ||
NODE_VERSION: 20.14.0 | ||
RUN_ID: ${{ github.run_id }} | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.NODE_VERSION}} | ||
|
||
- name: Install dependencies and validate linting and formatting | ||
run: | | ||
npm ci | ||
npm run validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
name: Tests | ||
|
||
on: | ||
# Triggers the workflow manually from the GitHub Actions tab | ||
workflow_dispatch: | ||
# Runs the workflow on every push to the repository | ||
push: | ||
# Runs the workflow on every push to the repository | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- closed | ||
branches: | ||
- master | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: 'pages' | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
cy-test: | ||
runs-on: ubuntu-22.04 | ||
name: Run Cypress Tests | ||
strategy: | ||
# don't fail the entire matrix on failure | ||
fail-fast: false | ||
matrix: | ||
# Run the job in parallel on different browser | ||
browser: | ||
- chrome | ||
- firefox | ||
- edge | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: cypress-io/github-action@v6 | ||
with: | ||
build: npm run cy:info | ||
wait-on-timeout: 120 | ||
browser: ${{ matrix.browser }} | ||
# record: true | ||
# parallel: true | ||
# group: 'Cy-${{ matrix.browser }}' | ||
spec: cypress/e2e/1-getting-started | ||
config-file: cypress.config.js | ||
env: | ||
# CYPRESS_PROJECT_ID: ${{ secrets.SORRY_CYPRESS_PROJECT_ID }} | ||
# CYPRESS_RECORD_KEY: ${{ secrets.SORRY_CYPRESS_RECORD_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
DEBUG: 'cypress:server:args' | ||
# - name: Upload Cypress Html Reports | ||
# uses: actions/upload-pages-artifact@v3 | ||
# with: | ||
# # Upload reports | ||
# name: cypress-report | ||
# path: 'cypress/reports' | ||
# retention-days: 3 | ||
# - name: Deploy to GitHub Pages | ||
# id: deployment | ||
# uses: actions/deploy-pages@v4.0.5 | ||
- name: Upload Cypress HTML Reports | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.browser }}-report | ||
path: 'cypress/reports' | ||
retention-days: 3 | ||
|
||
deploy-reports: | ||
runs-on: ubuntu-22.04 | ||
needs: cy-test | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout Repository | ||
|
||
- name: Download Chrome Report | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: chrome-report | ||
path: chrome-report | ||
- name: Display structure of downloaded files | ||
run: | | ||
pwd | ||
ls -l | ||
- name: Download Firefox Report | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: firefox-report | ||
path: firefox-report | ||
- name: Display structure of downloaded files | ||
run: | | ||
pwd | ||
ls -l | ||
- name: Download Edge Report | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: edge-report | ||
path: edge-report | ||
- name: Display structure of downloaded files | ||
run: | | ||
pwd | ||
ls -l | ||
- name: Copy Reports to Specific Directories | ||
run: | | ||
mkdir -p gh-pages/chrome | ||
mkdir -p gh-pages/firefox | ||
mkdir -p gh-pages/edge | ||
cp -r chrome-report gh-pages/chrome/ | ||
cp -r firefox-report gh-pages/firefox/ | ||
cp -r edge-report gh-pages/edge/ | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./gh-pages | ||
publish_branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
"id": 8739, | ||
"name": "Jane", | ||
"email": "jane@example.com" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,4 +229,4 @@ | |
"bs": "target end-to-end models" | ||
} | ||
} | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters