Skip to content

chore: improve integration test suites #615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 31, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 124 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,146 @@
version: 2.1

commands:
run_node_tests:
parameters:
cache_prefix:
type: string
default: ""
executors:
node_10:
working_directory: ~/haul_node_10
docker:
- image: circleci/node:10
node_latest:
working_directory: ~/haul_node_latest
docker:
- image: circleci/node:latest

jobs:
setup_node_10:
executor: node_10
steps:
- checkout
- attach_workspace:
at: ~/haul_node_10
- restore_cache:
keys:
- << parameters.cache_prefix >>-dependencies-{{ checksum "package.json" }}
- << parameters.cache_prefix >>-dependencies
- run: yarn
- node-10-dependencies-{{ checksum "package.json" }}
- node-10-dependencies
- run: yarn install --frozen-lockfile
- save_cache:
paths:
- node_modules
key: << parameters.cache_prefix >>-dependencies-{{ checksum "package.json" }}
key: node-10-dependencies-{{ checksum "package.json" }}
- persist_to_workspace:
root: .
paths: .

lint_and_typecheck_node_10:
executor: node_10
steps:
- attach_workspace:
at: ~/haul_node_10
- run: yarn lint
- run: yarn typecheck
- run: yarn test -i

executors:
node_10:
working_directory: ~/haul
docker:
- image: circleci/node:10
node_latest:
working_directory: ~/haul
docker:
- image: circleci/node:latest
unit_test_node_10:
executor: node_10
steps:
- attach_workspace:
at: ~/haul_node_10
- run: yarn test -i --coverage packages # run only tests in packages
- store_artifacts:
path: coverage
destination: coverage_node_10

rn_0_59x_integration_tests:
executor: node_10
steps:
- attach_workspace:
at: ~/haul_node_10
- run: yarn test -i integration_tests/react_native_0_59x

jobs:
test_node_10:
rn_0_60x_integration_tests:
executor: node_10
steps:
- attach_workspace:
at: ~/haul_node_10
- run: yarn test -i integration_tests/react_native_0_60x

rn_0_60x_ts_integration_tests:
executor: node_10
steps:
- attach_workspace:
at: ~/haul_node_10
- run: yarn test -i integration_tests/react_native_0_60x_ts

rn_0_60x_multibundle_integration_tests:
executor: node_10
steps:
- run_node_tests:
cache_prefix: "node_10"
test_node_latest:
- attach_workspace:
at: ~/haul_node_10
- run: yarn test -i integration_tests/react_native_0_60x_multibundle

setup_node_latest:
executor: node_latest
steps:
- run_node_tests:
cache_prefix: "node_latest"
- checkout
- attach_workspace:
at: ~/haul_node_latest
- restore_cache:
keys:
- node-latest-dependencies-{{ checksum "package.json" }}
- node-latest-dependencies
- run: yarn install --frozen-lockfile
- save_cache:
paths:
- node_modules
key: node-latest-dependencies-{{ checksum "package.json" }}
- persist_to_workspace:
root: .
paths: .

lint_and_typecheck_node_latest:
executor: node_latest
steps:
- attach_workspace:
at: ~/haul_node_latest
- run: yarn lint
- run: yarn typecheck

unit_test_node_latest:
executor: node_latest
steps:
- attach_workspace:
at: ~/haul_node_latest
- run: yarn test -i --coverage packages # run only tests in packages
- store_artifacts:
path: coverage
destination: coverage_node_latest


workflows:
version: 2
test:
jobs:
- test_node_10
- test_node_latest
- setup_node_10
- lint_and_typecheck_node_10:
requires:
- setup_node_10
- unit_test_node_10:
requires:
- setup_node_10
- rn_0_59x_integration_tests:
requires:
- setup_node_10
- rn_0_60x_integration_tests:
requires:
- setup_node_10
- rn_0_60x_ts_integration_tests:
requires:
- setup_node_10
- rn_0_60x_multibundle_integration_tests:
requires:
- setup_node_10
- setup_node_latest
- lint_and_typecheck_node_latest:
requires:
- setup_node_latest
- unit_test_node_latest:
requires:
- setup_node_latest
3 changes: 0 additions & 3 deletions fixtures/example-app/.babelrc

This file was deleted.

70 changes: 0 additions & 70 deletions fixtures/example-app/.flowconfig

This file was deleted.

61 changes: 0 additions & 61 deletions fixtures/example-app/.gitignore

This file was deleted.

72 changes: 0 additions & 72 deletions fixtures/example-app/App.js

This file was deleted.

12 changes: 0 additions & 12 deletions fixtures/example-app/__tests__/App.js

This file was deleted.

Loading