Skip to content

Commit

Permalink
chore(ci): do redundant setup-node step before checkout to enable yar…
Browse files Browse the repository at this point in the history
…n v4 before deps install

- makes nodejs version `lts/*` explicit in ci workflow
  • Loading branch information
legobeat committed Apr 26, 2024
1 parent a5e17fa commit 69e2b16
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 69e2b16

Please sign in to comment.