-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (60 loc) · 1.77 KB
/
pr.yml
File metadata and controls
76 lines (60 loc) · 1.77 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
name: pull-request
on:
pull_request:
branches:
- main
workflow_dispatch:
# Allow workflow to be triggered manually.
# Cancel in-progress runs when a new commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
detect-secrets:
name: detect-secrets
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install detect-secrets
run: |
pip install --upgrade "git+https://github.com/ibm/detect-secrets.git@master#egg=detect-secrets"
- name: Run detect-secrets
run: |
detect-secrets scan --update .secrets.baseline
detect-secrets -v audit --report --fail-on-unaudited --fail-on-live --fail-on-audited-real .secrets.baseline
build:
name: Test on Node.js ${{ matrix.node-version }}
needs: detect-secrets
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Display Node.js and npm versions
run: |
node --version
npm --version
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Run unit tests
run: npm run test-unit
- name: Run linter
run: npm run lint
- name: Check packages
run: npm run check-packages