-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (63 loc) · 1.97 KB
/
Copy pathci.yml
File metadata and controls
67 lines (63 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Four matrix jobs per PR, times the PRs in flight, put enough concurrent cold
# `npm i` runs against the registry to burn the whole job budget before a test
# ran, reddening the required gate on PRs that failed nothing (issue #1313), so
# the npm cache directory is restored across runs. package-lock.json is
# gitignored here, so the cache key is hashed from package.json:
# `cache-dependency-path` must name a file that exists or setup-node fails
# looking for a lock file, and `npm ci` is unavailable for the same reason. The
# budget absorbs a genuinely cold install rather than killing one mid-install.
name: CI
on:
pull_request:
merge_group:
types: [checks_requested]
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
typecheck:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: package.json
- run: npm i
- run: npm run typecheck
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: package.json
- run: npm i
- run: npm test
required:
name: CI required
if: ${{ always() }}
needs: [typecheck, test]
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Confirm required jobs passed
env:
TYPECHECK_RESULT: ${{ needs.typecheck.result }}
TEST_RESULT: ${{ needs.test.result }}
run: |
test "$TYPECHECK_RESULT" = success
test "$TEST_RESULT" = success