From 0735d7acee5045b14f0ca6e03cf422f7aaf7f7dd Mon Sep 17 00:00:00 2001 From: Daniel Holmgren Date: Thu, 23 Mar 2023 14:30:41 -0500 Subject: [PATCH] Speed up CI tests (#704) * couple of ci changes * change script name * missed quotes * bump cache version * try without matrices * try with matrix again * one more shard --- .github/workflows/repo.yaml | 9 ++++++++- package.json | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/repo.yaml b/.github/workflows/repo.yaml index a16716d6f22..fa8bd56d385 100644 --- a/.github/workflows/repo.yaml +++ b/.github/workflows/repo.yaml @@ -19,6 +19,9 @@ jobs: - run: yarn install --frozen-lockfile - run: yarn build test: + strategy: + matrix: + shard: [1/4, 2/4, 3/4, 4/4] runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -26,8 +29,12 @@ jobs: with: node-version: 18 cache: "yarn" + - uses: actions/cache@v3 + with: + path: /tmp/jest_rt + key: ${{ hashFiles('**/yarn.lock') }}-${{ matrix.shard }} - run: yarn install --frozen-lockfile - - run: yarn test + - run: yarn test:withFlags --maxWorkers=2 --shard=${{ matrix.shard }} --passWithNoTests verify: runs-on: ubuntu-latest steps: diff --git a/package.json b/package.json index fe4c057cab3..c044ea9fe70 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "verify": "lerna run verify --stream", "prettier": "lerna run prettier", "build": "lerna run build", - "test": "NODE_ENV=development lerna run test --stream" + "test": "NODE_ENV=development lerna run test --stream", + "test:withFlags": "NODE_ENV=development lerna run test --stream --" }, "devDependencies": { "@babel/core": "^7.18.6",