Skip to content

Commit

Permalink
chore(ci): Extract changelog tests into a separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
the-spyke committed Nov 24, 2020
1 parent 1a124a5 commit 1e2976e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
24 changes: 18 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,17 @@ jobs:
- finalize:
persist: false

test_all:
test_changelog:
executor: node_15
working_directory: /mnt/ramdisk
steps:
- initialize
- test:
path: packages/undercut-conventional-changelog-preset
- finalize:
persist: false

test_core:
parameters:
executor:
type: executor
Expand Down Expand Up @@ -286,21 +296,22 @@ workflows:
workflow:
jobs:
- setup
- test_all:
- test_changelog
- test_core:
matrix:
parameters:
executor: [node_12, node_14, node]
requires:
- setup
- build_pull:
requires:
- test_all
- test_core
- build_push:
requires:
- test_all
- test_core
- build_utils:
requires:
- test_all
- test_core
- build_node_10:
requires:
- build_pull
Expand All @@ -316,7 +327,7 @@ workflows:
- build_utils
- build_website:
requires:
- test_all
- setup
- release:
requires:
- build_pull
Expand All @@ -325,3 +336,4 @@ workflows:
- build_cli
- build_web_2019
- build_website
- test_changelog
2 changes: 1 addition & 1 deletion jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
projects: [
// `<rootDir>/packages/undercut-cli/`, -- Should be tested from a Node 10 environment.
// `<rootDir>/packages/undercut-config/`, -- Should have no tests.
`<rootDir>/packages/undercut-conventional-changelog-preset/`,
// `<rootDir>/packages/undercut-conventional-changelog-preset/`, -- Test as a separate job or test:changelog script.
// `<rootDir>/packages/undercut-node-10/`, -- Should be tested from a Node 10 environment.
// `<rootDir>/packages/undercut-perf/`, -- Performance tests must be in a separate job (very slow).
`<rootDir>/packages/undercut-pull/`,
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"lint": "./scripts/lint.sh",
"release": "lerna version --no-git-tag-version --no-private --no-push --conventional-commits",
"test": "jest",
"test:int": "jest --test-path-pattern='/.+\\.test\\.int\\.(c|m)?js$'",
"test:unit": "jest --test-path-pattern='/.+\\.test\\.(c|m)?js$'"
"test:changelog": "cd ./packages/undercut-conventional-changelog-preset/ && yarn test"
},
"devDependencies": {
"@babel/core": "^7.12.7",
Expand Down

0 comments on commit 1e2976e

Please sign in to comment.