From 933c601c2d772a8781ce86cd11fc9b10a0d35597 Mon Sep 17 00:00:00 2001 From: Alex Sanders Date: Wed, 22 Nov 2023 12:33:17 +0000 Subject: [PATCH] use corepack in CI --- .github/workflows/amp.yml | 2 ++ .github/workflows/ar-chromatic.yml | 2 ++ .github/workflows/ar-ci.yml | 2 ++ .github/workflows/ar-nodejs.yml | 1 + .github/workflows/ar-pr-deployment.yml | 1 + .github/workflows/build-check.yml | 2 ++ .github/workflows/bundle-analyser.yml | 2 ++ .github/workflows/compress.yml | 2 ++ .github/workflows/container.yml | 2 ++ .github/workflows/cypress.yml | 2 ++ .github/workflows/dcr-chromatic.yml | 2 ++ .github/workflows/jest.yml | 1 + .github/workflows/lighthouse.yml | 1 + .github/workflows/lint.yml | 1 + .github/workflows/playwright.yml | 2 ++ .github/workflows/pr-deployment.yml | 2 ++ .github/workflows/prettier.yml | 1 + .github/workflows/scheduled.yml | 2 ++ .github/workflows/schema-check.yml | 2 ++ .github/workflows/stories-check.yml | 2 ++ .github/workflows/typescript.yml | 1 + scripts/env/check-package-manager | 4 ++-- 22 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.github/workflows/amp.yml b/.github/workflows/amp.yml index 34cc2f1b3a0..664c47304e6 100644 --- a/.github/workflows/amp.yml +++ b/.github/workflows/amp.yml @@ -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' diff --git a/.github/workflows/ar-chromatic.yml b/.github/workflows/ar-chromatic.yml index 50eff89454d..d3fe00b5f7f 100644 --- a/.github/workflows/ar-chromatic.yml +++ b/.github/workflows/ar-chromatic.yml @@ -28,6 +28,8 @@ jobs: with: fetch-depth: 0 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/ar-ci.yml b/.github/workflows/ar-ci.yml index b7f136db268..7aced184c9c 100644 --- a/.github/workflows/ar-ci.yml +++ b/.github/workflows/ar-ci.yml @@ -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: diff --git a/.github/workflows/ar-nodejs.yml b/.github/workflows/ar-nodejs.yml index be1d1c1c505..707d90f7639 100644 --- a/.github/workflows/ar-nodejs.yml +++ b/.github/workflows/ar-nodejs.yml @@ -19,6 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 + - run: corepack enable - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/ar-pr-deployment.yml b/.github/workflows/ar-pr-deployment.yml index 7b6f2b5be0b..d7604a088cf 100644 --- a/.github/workflows/ar-pr-deployment.yml +++ b/.github/workflows/ar-pr-deployment.yml @@ -16,6 +16,7 @@ jobs: steps: - uses: actions/checkout@v4 + - run: corepack enable - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index b4aed5681d5..626cb47d2b5 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -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' diff --git a/.github/workflows/bundle-analyser.yml b/.github/workflows/bundle-analyser.yml index b90f830b33a..6d9fc6c23a7 100644 --- a/.github/workflows/bundle-analyser.yml +++ b/.github/workflows/bundle-analyser.yml @@ -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' diff --git a/.github/workflows/compress.yml b/.github/workflows/compress.yml index 8bc56f46991..dd806382922 100644 --- a/.github/workflows/compress.yml +++ b/.github/workflows/compress.yml @@ -18,6 +18,8 @@ jobs: steps: - uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 7e63cc4a44a..c40a0be2f96 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -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: diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index c74d9e8e6d6..812138e9405 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -22,6 +22,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/dcr-chromatic.yml b/.github/workflows/dcr-chromatic.yml index bf8fcb64fe6..10a740d7b27 100644 --- a/.github/workflows/dcr-chromatic.yml +++ b/.github/workflows/dcr-chromatic.yml @@ -28,6 +28,8 @@ jobs: with: fetch-depth: 0 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index 30d8b55d7f1..112d92a57aa 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -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' diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 0877c80aeb0..0682b67df09 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -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' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4a6ddd3e213..17b8457920a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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' diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 105a1e55a45..bd7e94b7612 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -22,6 +22,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - run: corepack enable + - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' diff --git a/.github/workflows/pr-deployment.yml b/.github/workflows/pr-deployment.yml index 39d9e19be10..026830de81b 100644 --- a/.github/workflows/pr-deployment.yml +++ b/.github/workflows/pr-deployment.yml @@ -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 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index cea24346764..5bb0a51ce85 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -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' diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index d8e127ffbc7..74ea45711a7 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -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: diff --git a/.github/workflows/schema-check.yml b/.github/workflows/schema-check.yml index df70f7b328a..a89a82af98f 100644 --- a/.github/workflows/schema-check.yml +++ b/.github/workflows/schema-check.yml @@ -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' diff --git a/.github/workflows/stories-check.yml b/.github/workflows/stories-check.yml index 552d6559008..4ac89699907 100644 --- a/.github/workflows/stories-check.yml +++ b/.github/workflows/stories-check.yml @@ -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' diff --git a/.github/workflows/typescript.yml b/.github/workflows/typescript.yml index d0da9aadc57..5f5bd0ff5b5 100644 --- a/.github/workflows/typescript.yml +++ b/.github/workflows/typescript.yml @@ -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 diff --git a/scripts/env/check-package-manager b/scripts/env/check-package-manager index da68ad9f618..5d7b7d9fc5c 100755 --- a/scripts/env/check-package-manager +++ b/scripts/env/check-package-manager @@ -20,11 +20,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);