Skip to content

Commit

Permalink
Add test execution to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanne committed May 15, 2024
1 parent 27807c6 commit 7c758d2
Showing 1 changed file with 30 additions and 24 deletions.
54 changes: 30 additions & 24 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,36 @@ jobs:
- name: Lint
run: npm run lint:check

# - name: Run tests
# run: npm test
#
# - name: Install E2E test dependencies
# run: |
# npx --yes playwright install-deps
# npx --yes playwright install
#
# - name: Run E2E tests
# run: npm run test:e2e
#
# - uses: actions/upload-artifact@v4
# with:
# name: playwright-test-results
# path: test-results
#
# - name: Run a11y tests
# run: npm run test:a11y
# env:
# # Use a different port (from the one used with E2E tests) to workaround problem in CI/GitHub Actions,
# # starting to occur with playwright/test 1.28.0:
# # Error: http://localhost:4173 is already used ...
# # See https://github.com/digitalservicebund/typescript-vite-application-template/actions/runs/3486985178/jobs/5834089375
# VITE_PORT: 4183
- name: Install E2E & A11y test dependencies
run: |
npx --yes playwright install --with-deps
- name: Run E2E tests
id: e2e
run: npm run test:e2e

- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.e2e.outcome == 'failure' }}
with:
name: playwright-e2e-test-results
path: test/e2e/playwright-report

- name: Run A11y tests
id: a11y
run: npm run test:a11y
env:
# Use a different port (from the one used with E2E tests) to workaround problem in CI/GitHub Actions,
# starting to occur with playwright/test 1.28.0:
# Error: http://localhost:3002 is already used ...
# See https://github.com/digitalservicebund/typescript-vite-application-template/actions/runs/3486985178/jobs/5834089375
VITE_PORT: 3002

- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.a11y.outcome == 'failure' }}

with:
name: playwright-a11y-test-results
path: test/a11y/playwright-report

- name: Build for production
run: npm run build:pages
Expand Down

0 comments on commit 7c758d2

Please sign in to comment.