-
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (99 loc) · 2.76 KB
/
Copy pathci.yml
File metadata and controls
107 lines (99 loc) · 2.76 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches: [main]
paths:
- 'src/**'
- 'test/**'
- 'bin/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'tsconfig.server.json'
- 'vite.config.ts'
- 'eslint.config.js'
- '.prettierrc.json'
- '.prettierignore'
- '.github/workflows/ci.yml'
- '.github/actions/setup/action.yml'
pull_request:
paths:
- 'src/**'
- 'test/**'
- 'bin/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'tsconfig.server.json'
- 'vite.config.ts'
- 'eslint.config.js'
- '.prettierrc.json'
- '.prettierignore'
- '.github/workflows/ci.yml'
- '.github/actions/setup/action.yml'
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint and format
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
with:
node-version: '22.13.x'
- run: npm run lint
- run: npm run format:check
typecheck:
name: Typecheck
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
with:
node-version: '22.13.x'
- run: npm run typecheck
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
with:
node-version: '22.13.x'
- run: npm run build
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup
with:
node-version: '22.13.x'
- run: npm run test:preflight
- run: npm run test:judge
- run: npm run test:runner
- run: npm run test:sandbox
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [lint, typecheck, build, test]
if: always()
steps:
- name: Verify all jobs succeeded
run: |
if [ "${{ needs.lint.result }}" != "success" ] || [ "${{ needs.typecheck.result }}" != "success" ] || [ "${{ needs.build.result }}" != "success" ] || [ "${{ needs.test.result }}" != "success" ]; then
echo "One or more required jobs failed."
exit 1
fi