New Design #14
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: Verify PR build | |
| on: | |
| pull_request: | |
| branches: [ 'main', 'master' ] | |
| concurrency: | |
| group: '${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}' | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: ./spock-website | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Verify LFS files | |
| run: | | |
| git lfs install | |
| git lfs fsck --pointers HEAD | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 # LTS | |
| cache: 'npm' | |
| cache-dependency-path: spock-website/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: 'gh-pages-preview' | |
| path: './spock-website/dist' | |
| verify: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.57.0-noble | |
| options: --user 1001 | |
| defaults: | |
| run: | |
| working-directory: ./spock-website | |
| steps: | |
| # Unlike the default image, the playwright image does not have git-lfs installed | |
| - name: Install git-lfs | |
| run: | | |
| apt-get update | |
| apt-get install -y git-lfs | |
| working-directory: ./ # the default only exists after checkout | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| lfs: true # Download LFS files for screenshots | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: 'npm' | |
| cache-dependency-path: spock-website/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run Playwright Tests | |
| run: npx playwright test | |
| - name: Upload Test Results (optional) | |
| uses: actions/upload-artifact@v5 | |
| if: always() | |
| with: | |
| name: playwright-report | |
| path: spock-website/playwright-report/ | |
| - name: Check for broken links | |
| run: npx linkinator ./dist/ |