Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm ci
- run: npm install -g @contrast/contrast-cli
- run: contrast-cli --api_key $CONTRAST_API_KEY --authorization $CONTRAST_AUTHORIZATION --organization_id $CONTRAST_ORG_ID --host $CONTRAST_HOST --application_id $CONTRAST_APPLICATION_ID
name: Contrast OSS Submit
env:
CONTRAST_API_KEY: ${{ secrets.CONTRAST_API_KEY }}
CONTRAST_AUTHORIZATION: ${{ secrets.CONTRAST_AUTHORIZATION }}
CONTRAST_ORG_ID: ${{ secrets.CONTRAST_ORG_ID }}
CONTRAST_HOST: ${{ secrets.CONTRAST_HOST }}
CONTRAST_APPLICATION_ID: ${{ secrets.CONTRAST_APPLICATION_ID }}
- run: contrast-cli -r -f -s high --api_key $CONTRAST_API_KEY --authorization $CONTRAST_AUTHORIZATION --organization_id $CONTRAST_ORG_ID --host $CONTRAST_HOST --application_id $CONTRAST_APPLICATION_ID
name: Contrast OSS Check
env:
CONTRAST_API_KEY: ${{ secrets.CONTRAST_API_KEY }}
CONTRAST_AUTHORIZATION: ${{ secrets.CONTRAST_AUTHORIZATION }}
CONTRAST_ORG_ID: ${{ secrets.CONTRAST_ORG_ID }}
CONTRAST_HOST: ${{ secrets.CONTRAST_HOST }}
CONTRAST_APPLICATION_ID: ${{ secrets.CONTRAST_APPLICATION_ID }}