-
Notifications
You must be signed in to change notification settings - Fork 565
56 lines (48 loc) · 1.49 KB
/
iac-smoke-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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@v4
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/'