Skip to content

Commit 5cfae66

Browse files
committed
ci: split CI into separate Build, Typecheck, and Test jobs
1 parent 751ebdf commit 5cfae66

1 file changed

Lines changed: 42 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,53 @@ name: CI
22

33
on:
44
pull_request:
5+
branches: [main]
56
push:
6-
branches:
7-
- main
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
env:
14+
BUN_VERSION: '1.2'
815

916
jobs:
10-
build-and-test:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
23+
- uses: oven-sh/setup-bun@v2
24+
with:
25+
bun-version: ${{ env.BUN_VERSION }}
26+
27+
- run: bun install --frozen-lockfile
28+
- run: bun run build
29+
30+
typecheck:
31+
name: Typecheck
1132
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v6
35+
36+
- uses: oven-sh/setup-bun@v2
37+
with:
38+
bun-version: ${{ env.BUN_VERSION }}
1239

40+
- run: bun install --frozen-lockfile
41+
- run: bun run typecheck
42+
43+
test:
44+
name: Test
45+
runs-on: ubuntu-latest
1346
steps:
14-
- name: Checkout
15-
uses: actions/checkout@v6
47+
- uses: actions/checkout@v6
1648

17-
- name: Setup Bun
18-
uses: oven-sh/setup-bun@v2
49+
- uses: oven-sh/setup-bun@v2
1950
with:
20-
bun-version: 1.3.9
21-
22-
- name: Install dependencies
23-
run: bun install --frozen-lockfile
24-
25-
- name: Build
26-
run: bun run build
27-
28-
- name: Test
29-
shell: bash
30-
run: |
31-
set -euo pipefail
32-
shopt -s globstar nullglob
33-
for file in tests/**/*.test.ts; do
34-
bun test "$file"
35-
done
51+
bun-version: ${{ env.BUN_VERSION }}
52+
53+
- run: bun install --frozen-lockfile
54+
- run: bun test

0 commit comments

Comments
 (0)