@snyk/protect: Production Smoke Tests #3800
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
name: '@snyk/protect: Production Smoke Tests' | |
on: | |
push: | |
branches: [protect/smoke-tests] | |
release: | |
types: [published] | |
schedule: | |
- cron: '0 23 * * *' | |
jobs: | |
smoke-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
node_version: [16, 18, 20] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
# Avoid modifying line endings in fixtures. | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: npx npm@7 config get cache | |
id: npm7-cache-dir | |
run: | | |
echo "::set-output name=dir::$(npx npm@7 config get cache)" | |
- uses: actions/cache@v2 | |
id: npm7-cache | |
with: | |
path: ${{ steps.npm7-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node${{ matrix.node_version }}-npm7-${{ hashFiles('**/package.json') }} | |
restore-keys: | | |
${{ runner.os }}-node${{ matrix.node_version }}-npm7- | |
- run: npx npm@7 install | |
- run: npx npm@7 run test:smoke -w @snyk/protect | |
env: | |
SNYK_TOKEN: ${{ secrets.TEST_SNYK_TOKEN }} | |
PRODUCTION_TEST: '1' |