From 44386bc7b6af460e0c403ff21f56ee173f3ce5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Sat, 15 Aug 2020 18:57:07 -0400 Subject: [PATCH] chore: share build artifacts in node version tests --- .github/workflows/ci.yml | 49 +++++++++++++++++++++++++++++++++++----- .travis.yml | 3 --- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ceb48cb8ca91..6b9170da181c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,13 +53,47 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - legacy-node-version-test: - name: Test on Node.js - needs: prepare-yarn-cache + build: + name: Build Babel Artifacts + needs: validate-yarn-cache + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Use Node.js latest + uses: actions/setup-node@v2-beta + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn config get cacheFolder)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + - name: Build babel artifacts + run: | + BABEL_ENV=test-legacy make -j build-standalone-ci + - uses: actions/upload-artifact@v2 + with: + name: babel-artifact + path: | + codemods/*/lib/**/* + eslint/*/lib/**/* + packages/*/lib/**/* + packages/babel-runtime/**/* + packages/babel-runtime-corejs2/**/* + packages/babel-runtime-corejs3/**/* + packages/babel-standalone/**/* + !**/node_modules/** + + test: + name: Test on Node.js # GitHub will add ${{ matrix.node-version }} to this title + needs: build runs-on: ubuntu-latest strategy: matrix: - node-version: [6.x, 8.x] + node-version: [13, 12, 10, 8, 6] steps: - name: Checkout code uses: actions/checkout@v2 @@ -72,9 +106,12 @@ jobs: with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} - - name: Build + - name: Install run: | - BABEL_ENV=test-legacy make -j bootstrap + BABEL_ENV=test-legacy make -j bootstrap-only + - uses: actions/download-artifact@v2 + with: + name: babel-artifact - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2-beta with: diff --git a/.travis.yml b/.travis.yml index 0836ce4d8972..654867a4e81e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,6 @@ matrix: - node_js: "node" env: JOB=lint # We test the latest version on circleci - - node_js: "13" # Move `windows` build to be the third since it is slow - os: windows node_js: "node" @@ -44,8 +43,6 @@ matrix: - $HOME/AppData/Local/Temp/chocolatey - $HOME/AppData/Local/Yarn/Berry/cache # Continue node_js matrix - - node_js: "12" - - node_js: "10" - node_js: "node" env: JOB=babel-parser-flow-tests - node_js: "node"