forked from snyk-labs/nodejs-goof
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d7ac1c
commit 0ad8a72
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |