Skip to content

Commit

Permalink
Create node.js.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wmurphysnyk authored Nov 13, 2024
1 parent 5d7ac1c commit 0ad8a72
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/node.js.yml
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

0 comments on commit 0ad8a72

Please sign in to comment.