forked from snyk-labs/nodejs-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSnyk
41 lines (33 loc) · 886 Bytes
/
Snyk
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
name: Snyk SCA & Code CLI Monitor
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Test and Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x] # Define Node.js versions here
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Snyk CLI and snyk-to-html
run: |
npm install snyk -g
npm install snyk-to-html -g
- name: Authenticate Snyk CLI
run: snyk auth ${{ secrets.SNYK_AUTH }}
- name: Snyk Open Source test and monitor
run: |
snyk test || true
snyk monitor
- name: Snyk Code test
run: snyk code test || true