ci: CI Testing #32
Workflow file for this run
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 configuration is loosely based on documentation here: | |
# https://github.com/stateful/vscode-awesome-ux/blob/main/docs/TestingExtensions.md#run-tests-in-cicd | |
name: End-to-end Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- run: npm ci | |
- name: Run end-to-end tests | |
run: xvfb-run npm run test:e2e | |
- name: Merge reports | |
run: npx ctrf merge e2e/reports --output ctrf-report.json | |
- name: Publish Test Summary Results | |
run: | | |
npm run gh:ctrf -- e2e/reports/ctrf-report.json | |
cp $GITHUB_STEP_SUMMARY e2e/reports/e2e-summary.html | |
- name: Save PR Number | |
run: echo ${{ github.event.number }} > e2e/reports/NR | |
- name: Upload Summary as Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: e2e-reports | |
path: e2e/reports/ | |
retention-days: 1 | |
# - name: Publish Summary as PR Comment | |
# uses: thollander/actions-comment-pull-request@v2 | |
# with: | |
# filePath: e2e/reports/e2e-summary.html | |
# comment_tag: summary |