Skip to content

ci: CI Testing

ci: CI Testing #25

Workflow file for this run

# 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
# There doesn't seem to be a way to configure the number of retention
# days here, but we can configure it in the repository settings.
run: |
npm run gh:ctrf -- e2e/reports/ctrf-report.json
{
echo 'STEP_SUMMARY_CONTENT<<EOF'
cat $GITHUB_STEP_SUMMARY
echo EOF
} >> "$GITHUB_ENV"
- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
message: '${{ env.STEP_SUMMARY_CONTENT }}'
comment_tag: summary