Skip to content

Commit 77e9f6b

Browse files
build: add tsc typecheck in CI (#1319)
* build: add tsc typecheck in CI * build: parallelize ci jobs
1 parent 56f3a47 commit 77e9f6b

File tree

2 files changed

+63
-21
lines changed

2 files changed

+63
-21
lines changed

.github/workflows/ci.yml

Lines changed: 62 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,67 @@ concurrency:
99
jobs:
1010
tests:
1111
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version-file: '.nvmrc'
19+
cache: 'npm'
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Test
23+
run: npm run test
24+
- name: Upload Coverage
25+
uses: codecov/codecov-action@v4
26+
with:
27+
fail_ci_if_error: false
28+
token: ${{ secrets.CODECOV_TOKEN }}
29+
30+
lint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version-file: '.nvmrc'
39+
cache: 'npm'
40+
- name: Install dependencies
41+
run: npm ci
42+
- name: Check types
43+
run: npm run check-types
44+
- name: Lint
45+
run: npm run lint
1246

47+
extract_translations:
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
- name: Setup Node.js
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version-file: '.nvmrc'
56+
cache: 'npm'
57+
- name: Install dependencies
58+
run: npm ci
59+
- name: Extract Translations
60+
run: make extract_translations
61+
62+
build:
63+
runs-on: ubuntu-latest
1364
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v4
16-
- name: Setup Nodejs
17-
uses: actions/setup-node@v4
18-
with:
19-
node-version-file: '.nvmrc'
20-
- name: Install dependencies
21-
run: npm ci
22-
- name: Lint
23-
run: npm run lint
24-
- name: extract_translations
25-
run: make extract_translations
26-
- name: Test
27-
run: npm run test
28-
- name: Upload Coverage
29-
uses: codecov/codecov-action@v4
30-
with:
31-
fail_ci_if_error: false
32-
token: ${{ secrets.CODECOV_TOKEN }}
33-
- name: Build
34-
run: npm run build
65+
- name: Checkout
66+
uses: actions/checkout@v4
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version-file: '.nvmrc'
71+
cache: 'npm'
72+
- name: Install dependencies
73+
run: npm ci
74+
- name: Build
75+
run: npm run build

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"build": "fedx-scripts webpack",
9494
"build:with-theme": "THEME=npm:@edx/brand-edx.org@latest npm run install-theme && npm run build",
9595
"i18n_extract": "fedx-scripts formatjs extract --throws",
96+
"check-types": "tsc --noEmit",
9697
"lint": "fedx-scripts eslint --ext .js --ext .jsx --ext .ts --ext .tsx .",
9798
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx --ext .ts --ext .tsx .",
9899
"precommit": "npm run lint",

0 commit comments

Comments
 (0)