Skip to content

Commit 6ec3a8e

Browse files
committed
fix: merge install, lint, build into one job
1 parent 7904bd4 commit 6ec3a8e

1 file changed

Lines changed: 24 additions & 32 deletions

File tree

.circleci/config.yml

Lines changed: 24 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,31 @@ jobs:
128128
mode: auto
129129
open-source-additional-arguments: --exclude=test
130130
iac-scan: disabled
131-
install:
132-
<<: *defaults
133-
steps:
134-
- install_deps
135-
lint:
131+
install_lint_build:
136132
<<: *defaults
137133
steps:
138134
- checkout
139-
- attach_workspace:
140-
at: ~/snyk-docker-plugin
141-
- run: npm run lint
135+
- restore_cache:
136+
keys:
137+
- v2-npm-cache-{{ checksum "package.json" }}
138+
- v2-npm-cache-
139+
- setup_npm_user
140+
- run: npm ci
141+
- save_cache:
142+
key: v2-npm-cache-{{ checksum "package.json" }}
143+
paths:
144+
- ~/.npm
145+
- run:
146+
name: Lint
147+
command: npm run lint
148+
- run:
149+
name: Build
150+
command: npm run build
151+
- persist_to_workspace:
152+
root: .
153+
paths:
154+
- node_modules/
155+
- dist/
142156
test:
143157
<<: *defaults
144158
parallelism: 4 # Run tests across 4 containers
@@ -188,13 +202,6 @@ jobs:
188202
command: |
189203
TEST=$(circleci tests glob "test/windows/**/*.spec.ts" | circleci tests split --split-by=timings | tr "\\" "/" | sed 's|test/windows/||g')
190204
npm run test-jest-windows -- $TEST
191-
build:
192-
<<: *defaults
193-
steps:
194-
- checkout_and_merge
195-
- setup_npm_user
196-
- run: npm ci
197-
- run: npm run build
198205
build_cli:
199206
<<: *defaults
200207
resource_class: medium
@@ -262,26 +269,11 @@ workflows:
262269
filters:
263270
branches:
264271
ignore: main
265-
- install:
266-
name: Install
267-
context:
268-
- nodejs-install
269-
- lint:
270-
name: Lint
272+
- install_lint_build:
273+
name: Install, Lint and Build
271274
context:
272275
- nodejs-install
273276
- snyk-bot-slack
274-
requires:
275-
- Install
276-
post-steps:
277-
- *slack-fail-notify
278-
- build:
279-
name: Build
280-
context:
281-
- nodejs-install
282-
- snyk-bot-slack
283-
requires:
284-
- Lint
285277
post-steps:
286278
- *slack-fail-notify
287279
- security-scans:

0 commit comments

Comments
 (0)