Skip to content

Commit 1c9b37c

Browse files
Merge pull request #74 from laryhills/feat/enforce-type-safety-in-ci
chore: 🔒 enforce type checks in ci
2 parents 58b25b9 + 15cae22 commit 1c9b37c

File tree

78 files changed

+508
-335
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+508
-335
lines changed

.eslintrc.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
{
2-
"extends": [
3-
"next/core-web-vitals",
4-
"next/typescript"
5-
]
6-
}
1+
{
2+
"extends": [
3+
"next/core-web-vitals",
4+
"next/typescript"
5+
],
6+
"rules": {
7+
"@typescript-eslint/no-unused-vars": "off",
8+
"@typescript-eslint/no-explicit-any": "off"
9+
}
10+
}

.github/workflows/ci.yml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,25 @@ on:
77
branches: [main, develop]
88

99
jobs:
10-
build:
10+
type-check:
1111
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: "20"
19+
cache: "npm"
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Run Type Check
25+
run: npm run type-check
1226

27+
lint:
28+
runs-on: ubuntu-latest
1329
steps:
1430
- uses: actions/checkout@v4
1531

@@ -25,11 +41,38 @@ jobs:
2541
- name: Run Lint
2642
run: npm run lint
2743

28-
- name: Run Type Check
29-
run: npm run type-check
44+
build:
45+
runs-on: ubuntu-latest
46+
needs: [type-check, lint]
47+
steps:
48+
- uses: actions/checkout@v4
49+
50+
- name: Set up Node.js
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: "20"
54+
cache: "npm"
55+
56+
- name: Install dependencies
57+
run: npm ci
3058

3159
- name: Run Build
3260
run: npm run build
3361

62+
test:
63+
runs-on: ubuntu-latest
64+
needs: [build]
65+
steps:
66+
- uses: actions/checkout@v4
67+
68+
- name: Set up Node.js
69+
uses: actions/setup-node@v4
70+
with:
71+
node-version: "20"
72+
cache: "npm"
73+
74+
- name: Install dependencies
75+
run: npm ci
76+
3477
- name: Run Tests
3578
run: npm run test

0 commit comments

Comments
 (0)