fix(tests): avoid Latest mode in forward navigation tests #40
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: WWW CI & Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| paths: ['www/**', '.github/workflows/www-ci.yml'] | |
| pull_request: | |
| branches: [main] | |
| paths: ['www/**', '.github/workflows/www-ci.yml'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| cache-dependency-path: 'www/pnpm-lock.yaml' | |
| - name: Install dependencies | |
| working-directory: ./www | |
| run: pnpm install | |
| - name: Lint | |
| working-directory: ./www | |
| run: pnpm run lint | |
| - name: Build | |
| working-directory: ./www | |
| run: pnpm run build | |
| - name: Install Playwright browsers | |
| working-directory: ./www | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| working-directory: ./www | |
| run: pnpm run test:e2e | |
| - name: Upload test report | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: www/playwright-report/ | |
| retention-days: 7 | |
| - name: Setup Pages | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/configure-pages@v5 | |
| - name: Upload Pages artifact | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./www/dist | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build-and-test | |
| if: github.ref == 'refs/heads/main' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |