From 08133a7cd91af286d3212c2b43131f4ecd3247b5 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Tue, 6 Aug 2024 16:35:39 -0400 Subject: [PATCH 1/3] ci: update cache to include all yarn.lock files --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 25dc65df..4d490eb4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ jobs: with: node-version: 22 cache: yarn + cache-dependency-path: "**/yarn.lock" - run: yarn install - run: yarn prettier --check . From d4f7b564ed6f4cd969f40520c30c9d20f1596664 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Tue, 6 Aug 2024 16:39:40 -0400 Subject: [PATCH 2/3] ci: update build workflows to use setup/node cache --- .github/workflows/main.yml | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4d490eb4..bfc2f845 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,34 +24,21 @@ jobs: node-version: [18, 20, 21] steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Determine Yarn Cache Path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/checkout@v4 - - uses: actions/cache@v4 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + - run: corepack enable - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 22 + cache: yarn + cache-dependency-path: "**/yarn.lock" - - name: Install Packages - run: yarn install --frozen-lockfile + - run: yarn install --frozen-lockfile - - name: Build - run: yarn build + - run: yarn build - name: Test run: yarn test --runInBand=false --maxWorkers=2 --workerIdleMemoryLimit=2GB # https://github.com/facebook/jest/issues/11956 env: - CI: true NODE_OPTIONS: --max_old_space_size=4096 From 75525cf1436091347f13a190bd68747084f1e925 Mon Sep 17 00:00:00 2001 From: Daniel Perez Alvarez Date: Tue, 6 Aug 2024 16:41:03 -0400 Subject: [PATCH 3/3] update --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bfc2f845..2debdf28 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,9 +28,10 @@ jobs: - run: corepack enable - - uses: actions/setup-node@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: - node-version: 22 + node-version: ${{ matrix.node-version }} cache: yarn cache-dependency-path: "**/yarn.lock"