Skip to content

Commit

Permalink
use corepack in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sndrs committed Nov 22, 2023
1 parent 0dba7c5 commit 39ae441
Show file tree
Hide file tree
Showing 22 changed files with 37 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/amp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ar-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
with:
fetch-depth: 0

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ar-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: corepack enable

# Get the desired version of Node installed
- uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ar-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ar-pr-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/bundle-analyser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/compress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v4

- run: corepack enable

- name: Install Node
uses: actions/setup-node@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dcr-chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
with:
fetch-depth: 0

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/jest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CAPI_KEY: ${{ secrets.CAPI_KEY }}

- run: corepack enable

# The peer dependencies script relies on `yarn`
- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/schema-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stories-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- run: corepack enable

- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
Expand Down
4 changes: 2 additions & 2 deletions scripts/env/check-package-manager
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const red = '\x1b[31m';
const dim = '\x1b[2m';

// get the package manager and version we need from package.json
const pkgPackageManager = require('../../package.json').packageManger;
const pkgPackageManager = require('../../package.json').packageManager;

if (!pkgPackageManager) {
warn(
`The 'packageManger' field is missing from the root package.json, but it is needed by ./scripts/env/check-package-manager (i.e. this file).`,
`The 'packageManager' field is missing from the root package.json, but it is needed by ./scripts/env/check-package-manager (i.e. this file).`,
);
log('Is that deliberate?');
process.exit(1);
Expand Down

0 comments on commit 39ae441

Please sign in to comment.