From ad875845e9f9cf0ab60a733357a2d2e70a9d1a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 19 Dec 2019 18:38:42 -0500 Subject: [PATCH 1/5] chore: remove Circle CI test config --- .circleci/config.yml | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 815244ed2edf..5e02ac132061 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,28 +9,6 @@ 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 @@ -50,28 +28,6 @@ executors: working_directory: ~/babel jobs: - test: - executor: node-executor - steps: - - checkout - - restore_cache: *restore-yarn-cache - - restore_cache: *restore-node-modules-cache - - run: yarn --version - - run: make test-ci-coverage - # Builds babel-standalone with the regular Babel config - - run: IS_PUBLISH=true make build - # test-ci-coverage doesn't test babel-standalone, as trying to gather coverage - # data for a JS file that's several megabytes large is bound to fail. Here, - # we just run the babel-standalone test separately. - - run: ./node_modules/.bin/jest packages/babel-standalone/test/ - - run: ./node_modules/.bin/jest packages/babel-preset-env-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: From deb74250885c8125464456b614fd469d1de99305 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 19 Dec 2019 18:39:49 -0500 Subject: [PATCH 2/5] chore: add GitHub Actions: Report Coverage --- .github/workflows/coverage.yml | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000000..82404b38bdb8 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,46 @@ +name: Report Coverage + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [13.x] + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get node_modules cache + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v1 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Test and generate coverage + 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" + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + From 07e2bf01ae773fb943d3f6c794ee860ed5f62310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 19 Dec 2019 18:46:39 -0500 Subject: [PATCH 3/5] chore: polish the step names --- .github/workflows/coverage.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 82404b38bdb8..5292ff8c7a41 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -9,11 +9,17 @@ jobs: matrix: node-version: [13.x] steps: - - uses: actions/checkout@v1 + - name: Checkout code + uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: Environment log + id: env + run: | + echo "::set-output name=yarn-cache-dir::$(yarn cache dir)" + yarn --version - name: Get node_modules cache uses: actions/cache@v1 with: @@ -22,15 +28,13 @@ jobs: restore-keys: | ${{ runner.os }}-yarn- - name: Get yarn cache - id: yarn-cache - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v1 + uses: actions/cache@v1 with: - path: ${{ steps.yarn-cache.outputs.dir }} + path: ${{ steps.env.outputs.yarn-cache-dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn- - - name: Test and generate coverage + - name: Generate coverage report run: | yarn --version make test-ci-coverage @@ -40,7 +44,8 @@ jobs: # 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" - - uses: codecov/codecov-action@v1 + - name: Upload coverage report + uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} From b2bd83da76d5406c2470db1e7272b9ef9023accc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 19 Dec 2019 19:04:06 -0500 Subject: [PATCH 4/5] chore: remove Circle CI test job definition --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5e02ac132061..783d63ca39c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -112,9 +112,6 @@ jobs: workflows: version: 2 - test: - jobs: - - test test262-master: jobs: - test262: From 6b47be75b7f623a905e55c4b90c3482f4ad6f26f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 19 Dec 2019 19:57:41 -0500 Subject: [PATCH 5/5] chore: remove cache actions as it seems that they are hanging forever --- .github/workflows/coverage.yml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 5292ff8c7a41..430a4c48cd3f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,22 +18,7 @@ jobs: - name: Environment log id: env run: | - echo "::set-output name=yarn-cache-dir::$(yarn cache dir)" yarn --version - - name: Get node_modules cache - uses: actions/cache@v1 - with: - path: node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - name: Get yarn cache - uses: actions/cache@v1 - with: - path: ${{ steps.env.outputs.yarn-cache-dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: Generate coverage report run: | yarn --version