Skip to content

Commit 6b58861

Browse files
zackpollardshenlong-tanwen
authored andcommitted
chore: multithreaded web linting (#17809)
1 parent 29936f3 commit 6b58861

File tree

3 files changed

+65
-30
lines changed

3 files changed

+65
-30
lines changed

.github/workflows/test.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,11 @@ jobs:
184184
run: npm run test:cov
185185
if: ${{ !cancelled() }}
186186

187-
web-unit-tests:
188-
name: Test & Lint Web
187+
web-lint:
188+
name: Lint Web
189189
needs: pre-job
190190
if: ${{ needs.pre-job.outputs.should_run_web == 'true' }}
191-
runs-on: ubuntu-latest
191+
runs-on: mich
192192
permissions:
193193
contents: read
194194
defaults:
@@ -214,7 +214,7 @@ jobs:
214214
run: npm ci
215215

216216
- name: Run linter
217-
run: npm run lint
217+
run: npm run lint:p
218218
if: ${{ !cancelled() }}
219219

220220
- name: Run formatter
@@ -225,6 +225,35 @@ jobs:
225225
run: npm run check:svelte
226226
if: ${{ !cancelled() }}
227227

228+
web-unit-tests:
229+
name: Test Web
230+
needs: pre-job
231+
if: ${{ needs.pre-job.outputs.should_run_web == 'true' }}
232+
runs-on: ubuntu-latest
233+
permissions:
234+
contents: read
235+
defaults:
236+
run:
237+
working-directory: ./web
238+
239+
steps:
240+
- name: Checkout code
241+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
242+
with:
243+
persist-credentials: false
244+
245+
- name: Setup Node
246+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
247+
with:
248+
node-version-file: './web/.nvmrc'
249+
250+
- name: Run setup typescript-sdk
251+
run: npm ci && npm run build
252+
working-directory: ./open-api/typescript-sdk
253+
254+
- name: Run npm install
255+
run: npm ci
256+
228257
- name: Run tsc
229258
run: npm run check:typescript
230259
if: ${{ !cancelled() }}

web/package-lock.json

Lines changed: 30 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"check:code": "npm run format && npm run lint && npm run check:svelte && npm run check:typescript",
1616
"check:all": "npm run check:code && npm run test:cov",
1717
"lint": "eslint . --max-warnings 0",
18+
"lint:p": "eslint-p . --max-warnings 0 --concurrency=4",
1819
"lint:fix": "npm run lint -- --fix",
1920
"format": "prettier --check .",
2021
"format:fix": "prettier --write .",
@@ -74,6 +75,7 @@
7475
"dotenv": "^16.4.7",
7576
"eslint": "^9.18.0",
7677
"eslint-config-prettier": "^10.0.0",
78+
"eslint-p": "^0.21.0",
7779
"eslint-plugin-svelte": "^3.0.0",
7880
"eslint-plugin-unicorn": "^57.0.0",
7981
"factory.ts": "^1.4.1",

0 commit comments

Comments
 (0)