Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2528 from snyk/chore/split-lint
chore(ci): run lint and build in parallel
  • Loading branch information
Jahed Ahmed committed Jan 11, 2022
2 parents 42c2ddb + 897ad08 commit 4b32331
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
36 changes: 22 additions & 14 deletions .circleci/config.yml
Expand Up @@ -73,17 +73,6 @@ commands:
key: npm-cache-v2-{{ arch }}-node<< parameters.node_version >>-npm<< parameters.npm_version >>-{{ checksum "package-lock.json" }}
paths:
- << parameters.npm_cache_directory >>
build_project:
steps:
- run:
name: Building project
command: npm run build:prod
- persist_to_workspace:
root: .
paths:
- dist/
- packages/*/dist
- pysrc
install_sdks_windows:
steps:
- restore_cache:
Expand Down Expand Up @@ -170,7 +159,7 @@ commands:
sudo apt update
sudo apt install osslsigncode
jobs:
build:
lint:
<<: *defaults
docker:
- image: cimg/node:<< parameters.node_version >>
Expand All @@ -181,7 +170,23 @@ jobs:
- run:
name: Linting project
command: npm run lint
- build_project
build:
<<: *defaults
docker:
- image: circleci/node:<< parameters.node_version >>
steps:
- checkout
- install_project_dependencies:
node_version: << parameters.node_version >>
- run:
name: Building project
command: npm run build:prod
- persist_to_workspace:
root: .
paths:
- dist/
- packages/*/dist
- pysrc
regression-test:
<<: *defaults
docker:
Expand Down Expand Up @@ -443,9 +448,10 @@ workflows:
version: 2
test_and_release:
jobs:
- lint:
name: Lint
- build:
name: Build
context: nodejs-install

- regression-test:
name: Regression Tests
Expand Down Expand Up @@ -535,6 +541,7 @@ workflows:
- dev-release:
name: Development Release
requires:
- Lint
- Build
filters:
branches:
Expand All @@ -549,4 +556,5 @@ workflows:
only:
- master
requires:
- Lint
- Build
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -33,7 +33,7 @@
"check-dev-environment": "ts-node ./scripts/check-dev-environment.ts",
"format": "prettier --write '**/*.{js,ts,json,yaml,yml,md}'",
"format:changes": "./scripts/format/prettier-changes.sh",
"lint": "run-p --aggregate-output lint:*",
"lint": "npm-run-all --serial --continue-on-error lint:*",
"lint:js": "eslint --color --cache '**/*.{js,ts}'",
"lint:formatting": "prettier --check '**/*.{js,ts,json,yaml,yml,md}'",
"build": "npm run build:dev",
Expand Down

0 comments on commit 4b32331

Please sign in to comment.