From 17ebdbc9f6b0ceff1985a80e6c467270df7eec90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Sat, 21 Dec 2019 19:56:29 -0500 Subject: [PATCH 1/2] chore: separate build-standalone with coverage --- .circleci/config.yml | 46 ++++++++++++++++++++++++++++++++++ .github/workflows/coverage.yml | 9 +------ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 783d63ca39c2..c0a7b79f78f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,28 @@ aliases: keys: - v1-yarn-cache + - &save-node-modules-cache + paths: + - node_modules + key: v1-yarn-deps-{{ checksum "yarn.lock" }} + + - &save-yarn-cache + paths: + - ~/.yarn-cache + key: v1-yarn-cache + + - &artifact_babel + path: ~/babel/packages/babel-standalone/babel.js + + - &artifact_babel_min + path: ~/babel/packages/babel-standalone/babel.min.js + + - &artifact_env + path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.js + + - &artifact_env_min + path: ~/babel/packages/babel-preset-env-standalone/babel-preset-env.min.js + - &test262_workdir working_directory: ~/babel/babel-test262-runner @@ -28,6 +50,25 @@ executors: working_directory: ~/babel jobs: + build-standalone: + executor: node-executor + steps: + - checkout + - restore_cache: *restore-yarn-cache + - restore_cache: *restore-node-modules-cache + # Builds babel-standalone with the regular Babel config + # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage + - run: IS_PUBLISH=true make -j build-standalone-ci + # data for a JS file that's several megabytes large is bound to fail. Here, + # we just run the babel-standalone test separately. + - run: yarn jest "\-standalone/test" + - store_artifacts: *artifact_babel + - store_artifacts: *artifact_babel_min + - store_artifacts: *artifact_env + - store_artifacts: *artifact_env_min + - save_cache: *save-node-modules-cache + - save_cache: *save-yarn-cache + test262: executor: node-executor steps: @@ -81,6 +122,8 @@ jobs: cat ~/diff.tap | $(npm bin)/tap-merge | $(npm bin)/tap-mocha-reporter xunit | tee ~/test-results/test262/results.xml <<: *test262_workdir - store_test_results: *artifact_test262_xunit + - save_cache: *save-node-modules-cache + - save_cache: *save-yarn-cache publish-verdaccio: executor: node-executor @@ -112,6 +155,9 @@ jobs: workflows: version: 2 + build-standalone: + jobs: + - build-standalone test262-master: jobs: - test262: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 430a4c48cd3f..03738da23034 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,15 +22,8 @@ jobs: - name: Generate coverage report run: | yarn --version - make test-ci-coverage - # Builds babel-standalone with the regular Babel config - # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage - IS_PUBLISH=true make build-standalone - # data for a JS file that's several megabytes large is bound to fail. Here, - # we just run the babel-standalone test separately. - yarn jest "\-standalone/test" + make -j test-ci-coverage - name: Upload coverage report uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} - From a661597f0ab2a4c4d53fbcf798b9a93cb8542a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Sat, 21 Dec 2019 20:22:53 -0500 Subject: [PATCH 2/2] style polish --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c0a7b79f78f8..5d6df0a9428e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -59,8 +59,8 @@ jobs: # Builds babel-standalone with the regular Babel config # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage - run: IS_PUBLISH=true make -j build-standalone-ci - # data for a JS file that's several megabytes large is bound to fail. Here, - # we just run the babel-standalone test separately. + # data for a JS file that's several megabytes large is bound to fail. Here, + # we just run the babel-standalone test separately. - run: yarn jest "\-standalone/test" - store_artifacts: *artifact_babel - store_artifacts: *artifact_babel_min