Skip to content

Commit

Permalink
feat(circle): run tests on node@11 (#517)
Browse files Browse the repository at this point in the history
#### Summary

<!-- provide a short summary of your changes -->

#### Description

<!-- provide some context -->

#### Technical debt & future

<!--
  Which technical debt does this PR introduce?
  How do we plan to resolve it?
  What is the next step after this PR?
-->
  • Loading branch information
tdeekens committed Nov 11, 2018
1 parent 0d2f082 commit e7b271e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 34 deletions.
67 changes: 34 additions & 33 deletions .circleci/config.yml
Expand Up @@ -24,6 +24,10 @@ executors:
docker:
- image: circleci/node:10
working_directory: *working_directory
node_11:
docker:
- image: circleci/node:11
working_directory: *working_directory

commands:
install_dependencies:
Expand All @@ -46,58 +50,51 @@ commands:
description: 'Running bundlesize check'
steps:
- run: yarn test:sizes
unit_test:
description: 'Running unit tests without covereage'
install_and_build:
description: 'Installing and building'
steps:
# Limiting the workers of Jest to 10
# as the build otherwise dies due to resouce restrictions.
- run: yarn test:ci --maxWorkers=10
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- build_artefacts
unit_test_with_coverage:
description: 'Running unit tests with covereage report'
steps:
- install_and_build
- run: yarn test:ci:coverage
unit_test_without_coverage:
description: 'Running unit tests without covereage report'
steps:
- install_and_build
- run: yarn test:ci --maxWorkers=10

jobs:
lint:
executor: node_10
steps:
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- save_cache: *save_yarn_cache
- build_artefacts
- install_and_build
- lint_code
type_check:
executor: node_10
steps:
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- build_artefacts
- install_and_build
- type_check
bundlesize_check:
executor: node_10
steps:
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- build_artefacts
- install_and_build
- check_artefacts_bundlesizes
build_test_unit_node_8:
build_test_node_8:
executor: node_8
steps:
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- build_artefacts
- unit_test_with_coverage
build_test_unit_node_10:
- unit_test_without_coverage
build_test_node_10:
executor: node_10
steps:
- checkout
- restore_cache: *restore_yarn_cache
- install_dependencies
- build_artefacts
- unit_test_without_coverage
build_test_node_11:
executor: node_11
steps:
- unit_test_with_coverage

workflows:
Expand All @@ -108,13 +105,17 @@ workflows:
- type_check:
requires:
- lint
- build_test_unit_node_8:
- build_test_node_8:
requires:
- type_check
- build_test_node_10:
requires:
- type_check
- build_test_unit_node_10:
- build_test_node_11:
requires:
- type_check
- bundlesize_check:
requires:
- build_test_unit_node_8
- build_test_unit_node_10
- build_test_node_8
- build_test_node_10
- build_test_node_11
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -3,7 +3,7 @@
"name": "flopflip",
"description": "Monorepository for flipflop and its projects e.g. react-redux, react and the wrapper",
"scripts": {
"postinstall": "check-node-version --package --print && yarn build",
"postinstall": "check-node-version --package --print",
"develop": "jest --projects .jestrc.*.json --watch",
"lint": "jest --config .jestrc.lint.json",
"flow": "jest --config .jestrc.flow.json",
Expand Down

0 comments on commit e7b271e

Please sign in to comment.