Let's include E2E tests for the website #24
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: E2E Website tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test-docs: | |
| name: E2E Testing | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| defaults: | |
| run: | |
| working-directory: scorecards-site | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: | | |
| yarn install --frozen-lockfile | |
| yarn add -D @playwright/test chromatic @chromatic-com/playwright | |
| yarn playwright install --with-deps | |
| - name: Run Playwright tests | |
| run: yarn playwright test | |
| env: | |
| CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| - name: Run test and Upload the generated Chromatic archives | |
| run: yarn chromatic --playwright -t="$CHROMATIC_PROJECT_TOKEN" | |
| env: | |
| CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| ENABLE_SNAPSHOTS: true |