Skip to content

Commit b038964

Browse files
committed
chore: make cis parallel
1 parent 52f8dbb commit b038964

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,54 @@ jobs:
2727

2828
- name: Run Typo Check
2929
run: nix develop --command typos .
30+
31+
lint:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
36+
- name: Setup Nix
37+
uses: ./.github/actions/setup-nix
3038
- name: Run Lint
3139
run: nix develop --command pnpm run lint
3240

41+
build-and-test:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
46+
47+
- name: Setup Nix
48+
uses: ./.github/actions/setup-nix
49+
3350
- name: Run Build
3451
run: nix develop --command pnpm run build
3552

3653
- name: Run Tests
37-
if: github.ref != 'refs/heads/main'
3854
run: nix develop --command pnpm test
3955

56+
coverage:
57+
runs-on: ubuntu-latest
58+
if: github.ref == 'refs/heads/main'
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
62+
- name: Setup Nix
63+
uses: ./.github/actions/setup-nix
4064
- name: Run Tests with Coverage
41-
if: github.ref == 'refs/heads/main'
4265
run: nix develop --command pnpm run coverage
43-
4466
- name: Create Coverage Badge
45-
if: github.ref == 'refs/heads/main'
4667
uses: jaywcjlove/coverage-badges-cli@bd6ccbf422c0ed54c01f283019fd2bc648f58541 # v2.2.0
4768
with:
4869
source: coverage/coverage-summary.json
4970
output: coverage/badges.svg
50-
5171
- name: Upload coverage artifact
52-
if: github.ref == 'refs/heads/main'
5372
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
5473
with:
5574
path: coverage
5675

5776
deploy-coverage:
58-
if: github.ref == 'refs/heads/main'
59-
needs: ci
77+
needs: coverage
6078
runs-on: ubuntu-latest
6179
environment:
6280
name: github-pages

0 commit comments

Comments
 (0)