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
102 changes: 79 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,8 @@ on:
branches: [main]

jobs:
ci:
lint:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
strategy:
matrix:
task: [lint, test, e2e]
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -34,41 +27,81 @@ 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

unit_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Run tests
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'
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: vitest-coverage
path: vitest-coverage

e2e_tests:
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Install Playwright Browsers
run: pnpm playwright install --with-deps

- name: Run e2e tests
env:
AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }}
run: pnpm test:e2e:headless

- name: Upload Playwright report
if: matrix.task == 'e2e' && failure()
if: 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'
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
Expand Down Expand Up @@ -96,3 +129,26 @@ jobs:
repo: repo.repo,
body: comment
});

report_coverage:
runs-on: ubuntu-latest
needs: unit_tests
if: always() && github.event_name == 'pull_request'
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4

- name: Download Coverage Artifact
uses: actions/download-artifact@v4
with:
name: vitest-coverage
path: vitest-coverage

- name: Report Coverage
uses: davelosert/vitest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
json-summary-path: vitest-coverage/coverage-summary.json
json-final-path: vitest-coverage/coverage-final.json
file-coverage-mode: changes
44 changes: 0 additions & 44 deletions .github/workflows/report_coverage.yml

This file was deleted.

2 changes: 1 addition & 1 deletion common/styles/variables.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* IMPORTANT: Please run `yarn storybook` when file changes to update `./themeMap.js` */
/* IMPORTANT: Please run `pnpm storybook` when file changes to update `./themeMap.js` */
:root {
/* Colors */
--primary: #3ed6f0; /* cerulean */
Expand Down
Loading