diff --git a/.circleci/config.yml b/.circleci/config.yml index 6b2bac12b91..40082e17d2e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -431,6 +431,8 @@ jobs: test_aio_local: executor: default-executor + environment: + RXJS_VERSION_7: '7.1.0' steps: - custom_attach_workspace - init_environment @@ -446,7 +448,15 @@ jobs: # Check the bundle sizes. - run: yarn --cwd aio payload-size aio-local # Run tests with RxJS v7. - - run: yarn --cwd aio add rxjs@7.1.0 + - run: yarn --cwd aio add rxjs@$RXJS_VERSION_7 && yarn --cwd aio aio-use-local + - run: + name: Ensure we use RxJS v7 + command: >- + node --eval " + const expected = process.env.RXJS_VERSION_7; + const actual = require('./aio/node_modules/rxjs/package.json').version; + assert(actual === expected, 'Expected RxJS v' + expected + ', but found v' + actual + '.'); + " - run: yarn --cwd aio test --progress=false --watch=false test_aio_tools: @@ -466,6 +476,8 @@ jobs: name: default-executor resource_class: xlarge parallelism: 5 + environment: + RXJS_VERSION_7: '7.1.0' steps: - custom_attach_workspace - init_environment @@ -477,8 +489,16 @@ jobs: # with either "0", "1", etc as node index. This can be passed to the "--shard" argument. - run: yarn --cwd aio example-e2e --setup --local --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL} # Run tests with RxJS v7. - # (Exclude some examples that are not yet compatible with v7.) - - run: yarn --cwd aio/tools/examples/shared add rxjs@7.1.0 && yarn --cwd aio boilerplate:add + - run: yarn --cwd aio/tools/examples/shared add rxjs@$RXJS_VERSION_7 && yarn --cwd aio example-use-local && yarn --cwd aio boilerplate:add + - run: + name: Ensure we use RxJS v7 + command: >- + node --eval " + const expected = process.env.RXJS_VERSION_7; + const actual = require('./aio/tools/examples/shared/node_modules/rxjs/package.json').version; + assert(actual === expected, 'Expected RxJS v' + expected + ', but found v' + actual + '.'); + " + # Exclude some examples that are not yet compatible with v7. - run: yarn --cwd aio example-e2e --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL} --exclude=practical-observable-usage --exclude=upgrade-module --exclude=upgrade-phonecat # This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`. @@ -492,7 +512,7 @@ jobs: - run: ./aio/scripts/build-artifacts.sh $AIO_SNAPSHOT_ARTIFACT_PATH $CI_PULL_REQUEST $CI_COMMIT - store_artifacts: path: *aio_preview_artifact_path - # The `destination` needs to be kept in synch with the value of + # The `destination` needs to be kept in sync with the value of # `AIO_ARTIFACT_PATH` in `aio/aio-builds-setup/Dockerfile` destination: aio/dist/aio-snapshot.tgz - run: node ./aio/scripts/create-preview $CIRCLE_BUILD_NUM