-
Notifications
You must be signed in to change notification settings - Fork 29
65 lines (50 loc) · 1.44 KB
/
test.yml
File metadata and controls
65 lines (50 loc) · 1.44 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
name: pr-test
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: pr-test/build
permissions:
security-events: 'write' # Required for zizmor to upload its results.
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
steps:
- name: Check out repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: 'false'
- name: Set up Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Update npm
run: npm install -g npm@11.7.0
- name: Install dependencies
run: npm ci
- name: Run prettier
run: npm run prettier:check
- name: Run lint
run: npm run lint
- name: Run strict build
run: npm run build:strict
- name: Build package
run: npm run build
- name: Run tests
run: npm test
- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
with:
persona: pedantic
version: 1.18.0
# - name Jest test coverage
# uses: ArtiomTr/jest-coverage-report-action@v2