Component Tests #5826
Workflow file for this run
This file contains hidden or 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: Component Tests | |
| on: deployment_status | |
| jobs: | |
| test: | |
| name: Component Tests | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| if: github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.environment_url, 'storybook') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4.2.0 # Uses version from package.json#packageManager | |
| - name: Setup Node (using .node-version) | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.node-version' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Get PR number | |
| uses: jwalton/gh-find-current-pr@master | |
| id: findPr | |
| with: | |
| state: open | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Run Storybook tests | |
| run: pnpm test:sb | |
| env: | |
| TARGET_URL: '${{ github.event.deployment_status.environment_url }}' | |
| - name: Upload Accessibility Report | |
| id: artifact-upload-step | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: accessibility-report | |
| path: ./config/storybook/artifacts/accessibilityReport.html | |
| overwrite: 'true' | |
| - name: Accessibility Report Preview | |
| if: success() && steps.findPr.outputs.number | |
| uses: thollander/actions-comment-pull-request@v3 | |
| with: | |
| pr-number: ${{ steps.findPr.outputs.number }} | |
| message: | | |
| Accessibility tests executed. Download the report [here](${{ steps.artifact-upload-step.outputs.artifact-url }}). |