Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on: push

# List of jobs
jobs:
chromatic-deployment:
visual_regression_check:
runs-on: ubuntu-latest

steps:
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-node@v5
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down
54 changes: 53 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
strategy:
matrix:
task: [lint, test]
task: [lint, test, e2e]
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -30,6 +34,10 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
if: matrix.task == 'e2e'
run: pnpm playwright install --with-deps

- name: Run lint
if: matrix.task == 'lint'
run: pnpm lint:ci
Expand All @@ -38,9 +46,53 @@ jobs:
if: matrix.task == 'test'
run: pnpm test:ci

- name: Run e2e tests
if: matrix.task == 'e2e'
env:
AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }}
run: pnpm test:e2e:headless

- name: Upload coverage artifact
if: matrix.task == 'test' && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: vitest-coverage
path: vitest-coverage

- name: Upload Playwright report
if: matrix.task == 'e2e' && failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
retention-days: 30

- name: Comment PR with Playwright artifact link
if: matrix.task == 'e2e' && failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const runId = context.runId;
const repo = context.repo;
const artifactUrl = `https://github.com/${repo.owner}/${repo.repo}/actions/runs/${runId}`;

const comment = `## ❌ Playwright Tests Failed

The Playwright tests have failed. Please download the test report artifact to see detailed information about the failures:

📊 [View test run and download artifact](${artifactUrl})

**How to view the report:**
1. Click the link above
2. Scroll to the bottom to the "Artifacts" section
3. Download the \`playwright-report\` artifact
4. Extract the zip file and open \`index.html\` in your browser

The report includes screenshots, videos, and detailed traces of the failed tests.`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: repo.owner,
repo: repo.repo,
body: comment
});
65 changes: 0 additions & 65 deletions .github/workflows/playwright.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/report_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: vitest-coverage
path: vitest-coverage
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

Expand Down
Loading