Skip to content

Commit

Permalink
Fix CI: Split Jest into separate job (TrueFiEng#362)
Browse files Browse the repository at this point in the history
* Change test command to exclude jest from testing

* Add script in package.json to run jest tests

* Add job to CircleCI to test jest

* Add newline at the end of package.json

* Add CircleCI Jest test for node 10.18

* Add a new test job on node 12.18 to CircleCI

* Add a new CI job for Jest testing on node 12.18

Co-authored-by: Daniel Izdebski
  • Loading branch information
duckception authored Sep 22, 2020
1 parent c31a6b8 commit 4dc2804
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 3 deletions.
56 changes: 54 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
key: 10
- setup_solc
- run: yarn build
- run: yarn test
- run: yarn test:others

test_node_11:
docker:
Expand All @@ -58,7 +58,55 @@ jobs:
key: 11
- setup_solc
- run: yarn build
- run: yarn test
- run: yarn test:others

test_node_12:
docker:
- image: circleci/node:12.18
steps:
- checkout
- setup_remote_docker
- install_dependencies:
key: 12
- setup_solc
- run: yarn build
- run: yarn test:others

test_jest_10:
docker:
- image: circleci/node:10.18
steps:
- checkout
- setup_remote_docker
- install_dependencies:
key: 10
- setup_solc
- run: yarn build
- run: yarn test:jest

test_jest_11:
docker:
- image: circleci/node:11.15
steps:
- checkout
- setup_remote_docker
- install_dependencies:
key: 11
- setup_solc
- run: yarn build
- run: yarn test:jest

test_jest_12:
docker:
- image: circleci/node:12.18
steps:
- checkout
- setup_remote_docker
- install_dependencies:
key: 12
- setup_solc
- run: yarn build
- run: yarn test:jest

example_mock_contracts:
working_directory: ~/project/examples/mock-contracts
Expand Down Expand Up @@ -150,6 +198,10 @@ workflows:
- lint
- test_node_10
- test_node_11
- test_node_12
- test_jest_10
- test_jest_11
- test_jest_12
- example_mock_contracts
- example_change_balance
- example_basic
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"postinstall": "patch-package",
"lint": "wsrun -c lint",
"build": "wsrun -te -c build",
"test": "wsrun -c test"
"test": "wsrun -c test",
"test:others": "wsrun -x @ethereum-waffle/jest -c test",
"test:jest": "wsrun -p @ethereum-waffle/jest -c test"
},
"devDependencies": {
"wsrun": "^5.2.0"
Expand Down

0 comments on commit 4dc2804

Please sign in to comment.