From a5e17fa9fbfdcbf46f8e57ab0d410f09a8acee1a Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 25 Apr 2024 23:50:39 +0000 Subject: [PATCH 1/2] ci: run `corepack enable` as part of prepare --- .github/workflows/build-lint-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index cf43ffe..18d3a74 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -14,6 +14,8 @@ jobs: with: node-version-file: '.nvmrc' cache: 'yarn' + - name: Install Yarn + run: corepack enable - name: Install Yarn dependencies run: yarn --immutable From 69e2b165b80cc82bce2d525ab29b3d74eb14a495 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Fri, 26 Apr 2024 00:14:33 +0000 Subject: [PATCH 2/2] chore(ci): do redundant setup-node step before checkout to enable yarn v4 before deps install - makes nodejs version `lts/*` explicit in ci workflow --- .github/workflows/build-lint-test.yml | 38 +++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml index 18d3a74..0cf0635 100644 --- a/.github/workflows/build-lint-test.yml +++ b/.github/workflows/build-lint-test.yml @@ -8,14 +8,18 @@ jobs: name: Prepare runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' - cache: 'yarn' + node-version: 'lts/*' - name: Install Yarn run: corepack enable + - uses: actions/checkout@v4 + - name: Use Node.js and install dependencies + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'yarn' - name: Install Yarn dependencies run: yarn --immutable @@ -25,11 +29,17 @@ jobs: needs: - prepare steps: + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + - name: Install Yarn + run: corepack enable - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: 'lts/*' cache: 'yarn' - run: yarn --immutable --immutable-cache - run: yarn build @@ -47,11 +57,17 @@ jobs: needs: - prepare steps: + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + - name: Install Yarn + run: corepack enable - uses: actions/checkout@v4 - name: Use Node.js uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version: 'lts/*' cache: 'yarn' - run: yarn --immutable --immutable-cache - run: yarn lint @@ -78,6 +94,12 @@ jobs: matrix: node-version: [18.x, 20.x] steps: + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Install Yarn + run: corepack enable - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 @@ -103,6 +125,12 @@ jobs: matrix: node-version: [18.x, 20.x] steps: + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + - name: Install Yarn + run: corepack enable - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4