v1.1278.0 #5326
Workflow file for this run
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: Infrastructure as Code Smoke Tests | |
on: | |
release: | |
types: [published] | |
workflow_call: | |
inputs: | |
is_skip_alert: | |
type: boolean | |
required: true | |
default: false | |
jobs: | |
run_iac_smoke_tests: | |
name: Run IaC smoke tests | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.16.0 | |
- name: Install dependencies | |
run: | | |
npm install | |
- name: Build Snyk CLI | |
run: | | |
npm run build:prod | |
- name: Run IaC smoke tests - non-Windows | |
id: run_smoke_tests_non_windows | |
if: ${{ matrix.os != 'windows' }} | |
env: | |
IAC_SMOKE_TESTS_SNYK_TOKEN: ${{ secrets.IAC_SMOKE_TESTS_SNYK_TOKEN }} | |
TEST_SNYK_COMMAND: ${{ format('node {0}/dist/cli/index.js', github.workspace) }} | |
run: | | |
npx jest --runInBand --testPathPattern '/test/smoke(/jest)?/iac/' | |
- name: Run IaC smoke tests - Windows | |
id: run_smoke_tests_windows | |
if: ${{ matrix.os == 'windows' }} | |
shell: pwsh | |
env: | |
IAC_SMOKE_TESTS_SNYK_TOKEN: ${{ secrets.IAC_SMOKE_TESTS_SNYK_TOKEN }} | |
TEST_SNYK_COMMAND: ${{ format('node {0}\dist\cli\index.js', github.workspace) }} | |
run: | | |
npx jest --runInBand --testPathPattern '/test/smoke(/jest)?/iac/' |