Skip to content

Commit fdeed16

Browse files
authored
BBC2-41 add GitHub Actions workflow to run bun test on PRs (#11)
1 parent 036b888 commit fdeed16

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronized, reopened]
6+
push:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ci-${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- uses: oven-sh/setup-bun@v2
20+
with:
21+
bun-version: "1.3.11"
22+
23+
- run: bun install --frozen-lockfile
24+
25+
# Typecheck before tests: `bun test` strips types and won't catch
26+
# type errors on its own. Running tsc first short-circuits the job
27+
# on type failures instead of wasting the test-run time.
28+
- run: bunx tsc --noEmit
29+
30+
- run: bun test

0 commit comments

Comments
 (0)