Skip to content

Commit

Permalink
Chore: split circle ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
pustovitDmytro committed Apr 27, 2021
1 parent 82f4156 commit 9f75a6b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 26 deletions.
68 changes: 44 additions & 24 deletions .circleci/config.yml
Expand Up @@ -66,22 +66,36 @@ jobs:
- run: *install
- run: *security
- save_cache: *cache-modules
tests:
test-coverage:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache-defaults
- run: *lint
- run: *debt
- run: *coverage
- store_test_results:
path: reports/test-results
- store_artifacts:
path: reports
- store_artifacts:
path: tmp/tests
- run: *coveralls
test-lint:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache-defaults
- run: *lint
- store_test_results:
path: reports/test-results
test-debt:
<<: *defaults
steps:
- checkout
- restore_cache:
<<: *cache-defaults
- run: *debt
- store_artifacts:
path: reports
test-package:
<<: *defaults
steps:
Expand All @@ -103,26 +117,32 @@ jobs:

workflows:
version: 2
# main:
# jobs:
# - install
# - tests:
# requires:
# - install
# - test-package:
# requires:
# - install
# - deploy:
# requires:
# - tests
# - test-package
# filters:
# branches:
# only: master
main:
jobs:
- install
- test-package:
requires:
- install
- test-lint:
requires:
- install
- test-debt:
requires:
- install
- test-coverage:
requires:
- install
- deploy:
requires:
- test-coverage
- test-package
filters:
branches:
only: master
pr:
# filters:
# branches:
# only: /pull\/[0-9]+/
filters:
branches:
only: /pull\/[0-9]+/
jobs:
- danger-pr
env-tests:
Expand Down
2 changes: 1 addition & 1 deletion .dangerfile.js
Expand Up @@ -9,7 +9,7 @@ const isOwner = danger.github.pr.user.login === danger.github.thisPR.owner;
const modifiedList = danger.git.modified_files.join('\n\n- ');

export default async function () {
message(`Changed Files in this PR: \n- ${modifiedList}`);
message(`Changed Files in this PR:\n\n- ${modifiedList}`);

if (system.modified && !isOwner) {
const files = system.getKeyedPaths().modified;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -7,7 +7,7 @@
"prepare": "babel src --out-dir ./lib && husky install",
"coveralls": "cat ./reports/coverage/lcov.info | coveralls",
"test:security": "npm audit && npm run test:lock",
"test:lint": "eslint src",
"test:lint": "eslint src bin tests",
"test:mocha": "mocha --config .mocharc.json tests/**/*test.js",
"test:package": "./bin/pack.sh && ENTRY=./tmp/package/lib npm run test:mocha",
"test:coverage": "BUILD=0 MODE=test nyc mocha --config .mocharc.json tests/**/*test.js",
Expand Down

0 comments on commit 9f75a6b

Please sign in to comment.