55 branches : [main]
66 pull_request :
77
8+ permissions :
9+ contents : read
10+ statuses : write
11+
812jobs :
9- test :
13+ unit :
1014 runs-on : ubuntu-latest
1115 timeout-minutes : 15
1216 steps :
1519 with :
1620 fetch-depth : 1
1721
22+ - name : Report pending status
23+ if : github.event_name == 'pull_request'
24+ uses : ./.github/actions/commit-status
25+ with :
26+ context : unit
27+ state : pending
28+ description : Running unit tests
29+
1830 - name : Setup Bun
1931 uses : oven-sh/setup-bun@v2
2032
@@ -28,10 +40,56 @@ jobs:
2840 - name : Install dependencies
2941 run : bun install --frozen-lockfile
3042
31- # No Postgres/Supabase/S3 services needed: the DB is an ephemeral in-memory PGlite started by
32- # the test script, and S3/Supabase are faked (see .env.test).
3343 - name : Unit tests
3444 run : bun run test:unit
3545
46+ - name : Report final status
47+ if : ${{ !cancelled() && github.event_name == 'pull_request' }}
48+ uses : ./.github/actions/commit-status
49+ with :
50+ context : unit
51+ state : ${{ job.status == 'success' && 'success' || 'failure' }}
52+ description : ${{ job.status == 'success' && 'Unit tests passed' || 'Unit tests failed' }}
53+
54+ integration :
55+ runs-on : ubuntu-latest
56+ timeout-minutes : 15
57+ steps :
58+ - name : Checkout repository
59+ uses : actions/checkout@v5
60+ with :
61+ fetch-depth : 1
62+
63+ - name : Report pending status
64+ if : github.event_name == 'pull_request'
65+ uses : ./.github/actions/commit-status
66+ with :
67+ context : integration
68+ state : pending
69+ description : Running integration tests
70+
71+ - name : Setup Bun
72+ uses : oven-sh/setup-bun@v2
73+
74+ - name : Cache bun install cache
75+ uses : actions/cache@v4
76+ with :
77+ path : ~/.bun/install/cache
78+ key : bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
79+ restore-keys : bun-${{ runner.os }}-
80+
81+ - name : Install dependencies
82+ run : bun install --frozen-lockfile
83+
84+ # No Postgres/Supabase/S3 services needed: the DB is an ephemeral in-memory PGlite started by
85+ # the test script, and S3/Supabase are faked (see .env.test).
3686 - name : Integration tests
3787 run : bun run test:integration
88+
89+ - name : Report final status
90+ if : ${{ !cancelled() && github.event_name == 'pull_request' }}
91+ uses : ./.github/actions/commit-status
92+ with :
93+ context : integration
94+ state : ${{ job.status == 'success' && 'success' || 'failure' }}
95+ description : ${{ job.status == 'success' && 'Integration tests passed' || 'Integration tests failed' }}
0 commit comments