Skip to content

adding ci pipeline

adding ci pipeline #59

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i -g snyk # note you can also use the snyk setup github action here, I'm just installing via NPM
- run: npm i -g snyk-to-html
- run: snyk auth ${{ secrets.SNYK_TOKEN }}
- name: run test
run: |
snyk monitor --target-name="my_target_from_GH"
- name: run tests
run: |
snyk test --json --target-name="my_os_target_from_GH"
snyk code test --report --target-name="my_code_target_from_GH"
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
name: results
path: build/os_results.html
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
name: results
path: build/code_results.html