-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (92 loc) · 2.53 KB
/
check.yaml
File metadata and controls
119 lines (92 loc) · 2.53 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
108
109
110
111
112
113
114
115
116
117
118
119
name: Check
on:
push:
branches:
- "main"
pull_request:
env:
PNPM_STORE_PATH: .pnpm-store
jobs:
generated_files_check:
name: Generated Files Check
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup Environment
uses: ./.github/actions/setup-environment
- name: Check generated Zod types are up-to-date
run: |
pnpm schema:generate
if ! git diff --exit-code; then
echo "The generated Zod types are not up-to-date. Please run \"pnpm generate\" locally and then commit the changes."
exit 1
fi
build:
name: Build
runs-on: ubuntu-24.04
needs: generated_files_check
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Build
run: |
pnpm build
- name: Upload build artifacts
uses: actions/upload-artifact@v6.0.0
with:
name: build-output
path: dist/
type:
name: Type Check
runs-on: ubuntu-24.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Download build artifacts
uses: actions/download-artifact@v7.0.0
with:
name: build-output
path: dist/
- name: Lint
run: |
pnpm types
lint:
name: Lint
runs-on: ubuntu-24.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Download build artifacts
uses: actions/download-artifact@v7.0.0
with:
name: build-output
path: dist/
- name: Lint
run: |
pnpm lint
commitlint:
name: Commitlint
runs-on: ubuntu-24.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Setup environment
uses: ./.github/actions/setup-environment
- name: Validate current commit
if: github.event_name == 'push'
run: pnpm commitlint --last --verbose
- name: Validate PR commits
if: github.event_name == 'pull_request'
run: pnpm commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose