-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (93 loc) · 3 KB
/
ci.yaml
File metadata and controls
104 lines (93 loc) · 3 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup pnpm
uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
- name: Setup node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
cache: pnpm
node-version-file: .tool-versions
- name: Install dependencies
run: pnpm install
- name: Run pnpm lint:eslint
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:eslint; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Try running `pnpm fix:eslint` locally to apply autofixes.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
- name: Run pnpm lint:knip
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:knip; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Try running `pnpm fix:knip` locally to apply autofixes.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
- name: Run pnpm lint:markdownlint
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:markdownlint; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Try running `pnpm fix:markdownlint` locally to apply autofixes.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
- name: Run pnpm lint:pnpm-dedupe
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:pnpm-dedupe; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Some dependencies can be deduplicated, which will make pnpm-lock.yaml'
echo 'lighter and potentially save us from unexplainable bugs.'
echo 'Please run `pnpm fix:pnpm-dedupe` locally and commit pnpm-lock.yaml.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
- name: Run pnpm lint:prettier
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:prettier; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Try running `pnpm fix:prettier` locally to apply autofixes.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi
- name: Run pnpm lint:tsc
if: ${{ success() || failure() }}
run: |
if ! pnpm lint:tsc; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Please fix the above errors locally for the check to pass.'
echo 'If you don’t see them, try merging target branch into yours.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi