-
Notifications
You must be signed in to change notification settings - Fork 1
120 lines (97 loc) · 3.18 KB
/
test.yml
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
120
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
Dependencies:
name: Install dependencies
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install Volta
uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Cache dependencies
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: node_modules/
key: ${{ runner.os }}-dependencies-${{ github.sha }}
Linting:
name: ESLint
needs: Dependencies
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install Volta
uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4
- name: Restore dependencies
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: restore-dependencies
with:
path: node_modules/
key: ${{ runner.os }}-dependencies-${{ github.sha }}
fail-on-cache-miss: true
- name: Register Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/eslint.json"
- name: Run ESLint
run: yarn lint
Building:
name: TypeScript
needs: Dependencies
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Install Volta
uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4
- name: Restore dependencies
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
id: restore-dependencies
with:
path: node_modules/
key: ${{ runner.os }}-dependencies-${{ github.sha }}
fail-on-cache-miss: true
- name: Register Problem Matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Run TypeScript compiler
run: yarn build
- name: Cache build output
if: github.ref_name == 'main'
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: dist/
key: ${{ runner.os }}-build-output-${{ github.sha }}
SpellChecking:
name: Typos
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false
- name: Run Typos CI
uses: crate-ci/typos@685eb3d55be2f85191e8c84acb9f44d7756f84ab # v1.29.4