ref: update social network icons #27
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: Playwright E2E | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| concurrency: | |
| group: e2e-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write # needed for the PR comment step | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Astro requires Node >=22.12.0 (see .node-version / package.json engines) | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: ".node-version" | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| # Install only Chromium in CI – matches playwright.config.ts project list | |
| - name: Install Playwright browsers | |
| run: bunx playwright install --with-deps chromium | |
| # Build the Astro site and start the preview server on port 4321 | |
| - name: Build Astro site | |
| run: bun run build | |
| env: | |
| BASE_URL: "http://localhost:4321" | |
| - name: Run Playwright E2E tests | |
| run: bunx playwright test | |
| env: | |
| CI: "true" | |
| PLAYWRIGHT_BASE_URL: "http://localhost:4321" | |
| # Always upload artifacts so failures can be investigated | |
| - name: Upload Playwright report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 14 | |
| - name: Upload test results (traces, videos, screenshots) | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: playwright-results | |
| path: test-results/ | |
| retention-days: 14 | |
| # Comment on the PR with run status and artifact links. | |
| # Uses github-script so it works from fork PRs without leaking secrets | |
| # (GITHUB_TOKEN is scoped to the target repo). | |
| - name: Comment on PR | |
| if: always() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v9 | |
| env: | |
| JOB_STATUS: ${{ job.status }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const script = require('./.github/workflows/comment-pr.js') | |
| await script({ github, context, core }) |