test: run axe-playwright a11y tests using test-storybook #6
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
name: Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'packages/**' | |
- 'apps/storybook/**' | |
permissions: | |
checks: write | |
# Required to put a comment into the pull-request | |
pull-requests: write | |
jobs: | |
checks: | |
name: Build & test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/gh-setup | |
- name: Build | |
run: yarn build | |
- name: Types | |
run: yarn types:react | |
- name: Test | |
run: yarn test | |
- name: 'Report Coverage' | |
if: success() || failure() | |
uses: davelosert/vitest-coverage-report-action@v2 | |
- name: Publish unit test report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: 'test-report.xml' | |
detailed_summary: true | |
check_name: Unit Test Report | |
check_annotations: true | |
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}' | |
- name: Install Playwright | |
run: npx playwright install --with-deps | |
- name: Build storybook | |
run: yarn build:storybook | |
- name: Run Storybook tests | |
run: yarn test:storybook | |
- name: Replace relative paths in test report | |
uses: jacobtomlinson/gha-find-replace@v3 | |
if: success() || failure() | |
with: | |
include: 'apps/storybook/test-report.xml' | |
find: '../../' | |
replace: '' | |
regex: false | |
- name: Publish Storybook test report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
report_paths: 'apps/storybook/test-report.xml' | |
detailed_summary: true | |
check_name: Storybook Test Report | |
check_annotations: true | |
check_title_template: '{{FILE_NAME}} / {{TEST_NAME}}' |