Skip to content

Commit 83ffe82

Browse files
authored
Run unit test in CI for all (#103)
1 parent 997ec5e commit 83ffe82

1 file changed

Lines changed: 23 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,26 @@ jobs:
3838
annotations: true
3939
advanced-security: false
4040

41-
test:
42-
name: Test
41+
test-unit:
42+
name: Test Unit
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 10
45+
steps:
46+
- name: Check out repo
47+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
48+
with:
49+
persist-credentials: false
50+
51+
- uses: ./.github/actions/ci-setup
52+
53+
- name: Build
54+
run: pnpm build
55+
56+
- name: Unit tests
57+
run: pnpm test:unit
58+
59+
test-integration:
60+
name: Test Integration
4361
runs-on: ubuntu-latest
4462
timeout-minutes: 20
4563
# Integration tests push to the repo, which requires a token with write
@@ -64,9 +82,6 @@ jobs:
6482
- name: Build
6583
run: pnpm build
6684

67-
- name: Unit tests
68-
run: pnpm test:unit
69-
7085
- name: Integration tests
7186
run: pnpm test:integration
7287
env:
@@ -75,7 +90,7 @@ jobs:
7590
typecheck:
7691
name: Typecheck
7792
runs-on: ubuntu-latest
78-
timeout-minutes: 20
93+
timeout-minutes: 10
7994
steps:
8095
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
8196
with:
@@ -92,7 +107,7 @@ jobs:
92107
lint:
93108
name: Lint
94109
runs-on: ubuntu-latest
95-
timeout-minutes: 20
110+
timeout-minutes: 10
96111
steps:
97112
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
98113
with:
@@ -113,7 +128,7 @@ jobs:
113128
name: CI OK
114129
runs-on: ubuntu-latest
115130
if: always()
116-
needs: [lint-workflows, test, typecheck, lint]
131+
needs: [lint-workflows, test-unit, test-integration, typecheck, lint]
117132
steps:
118133
- name: Exit with error if some jobs are not successful
119134
run: exit 1

0 commit comments

Comments
 (0)