Skip to content
Draft
Show file tree
Hide file tree
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
82 changes: 43 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,19 @@ jobs:
mode: auto
open-source-additional-arguments: --exclude=test
iac-scan: disabled
install:
install_lint_build:
<<: *defaults
steps:
- install_deps
lint:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/snyk-docker-plugin
- run: npm run lint
- run:
name: Lint
command: npm run lint
- run:
name: Build
command: npm run build

test:
<<: *defaults
steps:
Expand All @@ -146,15 +148,31 @@ jobs:
test_jest_windows_with_docker:
<<: *windows_big
steps:
- run:
name: Start Docker pull
command: |
# The plugin.spec.ts test is slow due to pulling a 2+GB image,
# so we pull the image in the background to save time
docker pull python@sha256:1f92d35b567363820d0f2f37c7ccf2c1543e2d852cea01edb027039e6aef25e6
background: true
- checkout
- install_node_npm:
node_version: << parameters.node_version >>
- setup_npm_user
- run: npm ci
- run: docker version
- run:
command: npm run test-jest-windows
name: Install JUnit coverage reporter
command: npm install --no-save jest-junit
- run:
name: Run Windows tests
command: npm run test-jest-windows --reporters=default --reporters=jest-junit
no_output_timeout: 20m
environment:
JEST_JUNIT_OUTPUT_DIR: './reports/junit'
JEST_JUNIT_ADD_FILE_ATTRIBUTE: 'true'
- store_test_results:
path: reports
test_jest_windows_no_docker:
<<: *windows_big
steps:
Expand All @@ -166,19 +184,22 @@ jobs:
# make docker appear to be broken.
- run: "function docker() { return 1; }"
- run:
command: npm run test-jest-windows
name: Install JUnit coverage reporter
command: npm install --no-save jest-junit
- run:
name: Run Windows tests
command: npm run test-jest-windows --reporters=default --reporters=jest-junit
no_output_timeout: 20m
build:
<<: *defaults
steps:
- checkout_and_merge
- setup_npm_user
- run: npm ci
- run: npm run build
environment:
JEST_JUNIT_OUTPUT_DIR: './reports/junit'
JEST_JUNIT_ADD_FILE_ATTRIBUTE: 'true'
- store_test_results:
path: reports
build_cli:
<<: *defaults
resource_class: medium
steps:
- setup_remote_docker
- checkout_and_merge
- run:
name: Setup NPM credentials
Expand All @@ -190,7 +211,6 @@ jobs:
<<: *defaults
resource_class: medium
steps:
- setup_remote_docker
- checkout_and_merge
- run:
name: Build a Go binary with latest Go version
Expand Down Expand Up @@ -225,26 +245,11 @@ workflows:
filters:
branches:
ignore: main
- install:
name: Install
context:
- nodejs-install
- lint:
name: Lint
- install_lint_build:
name: Install, Lint, and Build
context:
- nodejs-install
- snyk-bot-slack
requires:
- Install
post-steps:
- *slack-fail-notify
- build:
name: Build
context:
- nodejs-install
- snyk-bot-slack
requires:
- Lint
post-steps:
- *slack-fail-notify
- security-scans:
Expand All @@ -258,7 +263,7 @@ workflows:
- nodejs-install
- snyk-bot-slack
requires:
- Build
- Install, Lint, and Build
post-steps:
- *slack-fail-notify
- test_jest_windows_with_docker:
Expand All @@ -268,7 +273,7 @@ workflows:
- snyk-bot-slack
node_version: *windows_node_version
requires:
- Build
- Install, Lint, and Build
post-steps:
- *slack-fail-notify
- test_jest_windows_no_docker:
Expand All @@ -278,7 +283,7 @@ workflows:
- snyk-bot-slack
node_version: *windows_node_version
requires:
- Build
- Install, Lint, and Build
post-steps:
- *slack-fail-notify
- build_cli:
Expand All @@ -287,7 +292,7 @@ workflows:
- nodejs-install
- snyk-bot-slack
requires:
- Build
- Install, Lint, and Build
post-steps:
- *slack-fail-notify
- release:
Expand All @@ -300,8 +305,7 @@ workflows:
only:
- main
requires:
- Lint
- Build
- Install, Lint, and Build
- Security Scans
- Test
- Test Jest Windows with Docker
Expand Down
13 changes: 7 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.