Skip to content

Commit 0023983

Browse files
committed
Added GitHub workflow
1 parent 51dd822 commit 0023983

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ci-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
name: Test (Node ${{ matrix.node }})
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
node: [18.x, 20.x, 22.x]
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: pnpm/action-setup@v4
27+
with:
28+
version: 9
29+
run_install: false
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: ${{ matrix.node }}
34+
cache: pnpm
35+
36+
- name: Install dependencies
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Build and test
40+
run: pnpm test:spec
41+
42+
coverage:
43+
name: Coverage (domain suite)
44+
runs-on: ubuntu-latest
45+
needs: test
46+
steps:
47+
- uses: actions/checkout@v4
48+
49+
- uses: pnpm/action-setup@v4
50+
with:
51+
version: 9
52+
run_install: false
53+
54+
- uses: actions/setup-node@v4
55+
with:
56+
node-version: 20.x
57+
cache: pnpm
58+
59+
- name: Install dependencies
60+
run: pnpm install --frozen-lockfile
61+
62+
- name: Run coverage
63+
run: |
64+
set -o pipefail
65+
pnpm test:domain:cov | tee coverage/typecheck/coverage.log
66+
67+
- name: Coverage summary
68+
run: |
69+
{
70+
echo "## Coverage (domain suite)";
71+
echo "";
72+
grep -A20 "All files" coverage/typecheck/coverage.log || cat coverage/typecheck/coverage.log;
73+
} >> "$GITHUB_STEP_SUMMARY"
74+
75+
- name: Upload coverage artifacts
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: coverage-typecheck
79+
path: coverage/typecheck

0 commit comments

Comments
 (0)