-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (65 loc) · 1.95 KB
/
lint.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
name: Lint
on: [push]
jobs:
git-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: 'package.json'
- run: pnpm install
- if: github.event_name == 'pull_request'
run: pnpm exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- if: github.event_name == 'push'
run: echo "${{ github.event.head_commit.message }}" | pnpm exec commitlint --verbose
type-checking:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ts: [5.0.x, 5.1.x, 5.2.x, 5.3.x, 5.4.x, 5.5.x]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: 'package.json'
- name: Use Typescript@${{ matrix.ts }} & @types/node@${{ matrix.node-dts }}
run: |
pnpm install
pnpm install typescript@${{ matrix.ts }}
- run: pnpm exec tsc
code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version-file: 'package.json'
- run: pnpm install
- run: pnpm exec prettier --cache --check .
bundle:
needs: [git-commit, type-checking, code-format]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [18, 20, 22]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ matrix.node }}
- run: pnpm install
- run: pnpm build