-
-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (44 loc) · 1.13 KB
/
ci-node.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
name: ci-node
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install
- run: pnpm run lint
test:
strategy:
fail-fast: false
matrix:
node: [18, 20]
eslint: ['^7.0.0', '^8.0.0']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
# To avoid differences in snapshot tests.
- run: git config --global core.autocrlf false
if: ${{ matrix.os == 'windows-latest' }}
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Change ESLint version
run: pnpm add -D eslint@${{ matrix.eslint }}
- run: pnpm run test
- run: pnpm run build
- run: pnpm run postbuild:test