Skip to content

Commit 56071cc

Browse files
authored
Fix report upload workflow (#1958)
1 parent eab4e14 commit 56071cc

File tree

3 files changed

+80
-68
lines changed

3 files changed

+80
-68
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,8 @@ on:
77
branches: [main]
88

99
jobs:
10-
ci:
10+
lint:
1111
runs-on: ubuntu-latest
12-
timeout-minutes: 15
13-
permissions:
14-
contents: read
15-
pull-requests: write
16-
strategy:
17-
matrix:
18-
task: [lint, test, e2e]
1912
steps:
2013
- name: Checkout
2114
uses: actions/checkout@v5
@@ -34,41 +27,81 @@ jobs:
3427
- name: Install dependencies
3528
run: pnpm install
3629

37-
- name: Install Playwright Browsers
38-
if: matrix.task == 'e2e'
39-
run: pnpm playwright install --with-deps
40-
4130
- name: Run lint
42-
if: matrix.task == 'lint'
4331
run: pnpm lint:ci
4432

33+
unit_tests:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v5
38+
39+
- name: Install pnpm
40+
uses: pnpm/action-setup@v4
41+
with:
42+
run_install: false
43+
44+
- name: Install Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version-file: ".nvmrc"
48+
cache: "pnpm"
49+
50+
- name: Install dependencies
51+
run: pnpm install
52+
4553
- name: Run tests
46-
if: matrix.task == 'test'
4754
run: pnpm test:ci
4855

49-
- name: Run e2e tests
50-
if: matrix.task == 'e2e'
51-
env:
52-
AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }}
53-
run: pnpm test:e2e:headless
54-
5556
- name: Upload coverage artifact
56-
if: matrix.task == 'test' && github.event_name == 'pull_request'
57+
if: github.event_name == 'pull_request'
5758
uses: actions/upload-artifact@v4
5859
with:
5960
name: vitest-coverage
6061
path: vitest-coverage
6162

63+
e2e_tests:
64+
runs-on: ubuntu-latest
65+
timeout-minutes: 15
66+
permissions:
67+
contents: read
68+
pull-requests: write
69+
steps:
70+
- name: Checkout
71+
uses: actions/checkout@v5
72+
73+
- name: Install pnpm
74+
uses: pnpm/action-setup@v4
75+
with:
76+
run_install: false
77+
78+
- name: Install Node.js
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version-file: ".nvmrc"
82+
cache: "pnpm"
83+
84+
- name: Install dependencies
85+
run: pnpm install
86+
87+
- name: Install Playwright Browsers
88+
run: pnpm playwright install --with-deps
89+
90+
- name: Run e2e tests
91+
env:
92+
AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }}
93+
run: pnpm test:e2e:headless
94+
6295
- name: Upload Playwright report
63-
if: matrix.task == 'e2e' && failure()
96+
if: failure()
6497
uses: actions/upload-artifact@v4
6598
with:
6699
name: playwright-report
67100
path: playwright-report/
68101
retention-days: 30
69102

70103
- name: Comment PR with Playwright artifact link
71-
if: matrix.task == 'e2e' && failure() && github.event_name == 'pull_request'
104+
if: failure() && github.event_name == 'pull_request'
72105
uses: actions/github-script@v7
73106
with:
74107
script: |
@@ -96,3 +129,26 @@ jobs:
96129
repo: repo.repo,
97130
body: comment
98131
});
132+
133+
report_coverage:
134+
runs-on: ubuntu-latest
135+
needs: unit_tests
136+
if: always() && github.event_name == 'pull_request'
137+
permissions:
138+
pull-requests: write
139+
steps:
140+
- uses: actions/checkout@v4
141+
142+
- name: Download Coverage Artifact
143+
uses: actions/download-artifact@v4
144+
with:
145+
name: vitest-coverage
146+
path: vitest-coverage
147+
148+
- name: Report Coverage
149+
uses: davelosert/vitest-coverage-report-action@v2
150+
with:
151+
github-token: ${{ secrets.GITHUB_TOKEN }}
152+
json-summary-path: vitest-coverage/coverage-summary.json
153+
json-final-path: vitest-coverage/coverage-final.json
154+
file-coverage-mode: changes

.github/workflows/report_coverage.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

common/styles/variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* IMPORTANT: Please run `yarn storybook` when file changes to update `./themeMap.js` */
1+
/* IMPORTANT: Please run `pnpm storybook` when file changes to update `./themeMap.js` */
22
:root {
33
/* Colors */
44
--primary: #3ed6f0; /* cerulean */

0 commit comments

Comments
 (0)