Skip to content

Commit

Permalink
Use pnpm corepack instead of installing it in CI (#6038)
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh authored May 21, 2024
1 parent f03e4b7 commit a81fa54
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 139 deletions.
100 changes: 28 additions & 72 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
# We don't want to install until later,
# when the cache and Cypress are in place
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -103,11 +98,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -185,11 +177,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -267,11 +256,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -349,11 +335,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -431,11 +414,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -512,11 +492,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -594,11 +571,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -676,11 +650,8 @@ jobs:
# with:
# node-version: ${{ matrix.node-version }}

# - uses: pnpm/action-setup@v3
# name: Install pnpm
# with:
# version: 9
# run_install: false
# - name: Enable corepack
# run: corepack enable

# - name: Get pnpm store directory
# shell: bash
Expand Down Expand Up @@ -747,11 +718,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -830,11 +798,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -940,11 +905,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -1081,11 +1043,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -1165,11 +1124,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
28 changes: 8 additions & 20 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -55,11 +52,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -95,11 +89,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -135,11 +126,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
27 changes: 6 additions & 21 deletions .github/workflows/deployment_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
# We don't want to install until later,
# when the cache and Cypress are in place
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -88,13 +83,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
# We don't want to install until later,
# when the cache and Cypress are in place
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -155,13 +145,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
# We don't want to install until later,
# when the cache and Cypress are in place
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
35 changes: 10 additions & 25 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -72,11 +69,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -113,11 +107,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -148,11 +139,8 @@ jobs:
with:
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down Expand Up @@ -191,11 +179,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 9
run_install: false
- name: Enable corepack
run: corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 3 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ build:
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- npm install -g pnpm@latest
- corepack enable
- corepack prepare pnpm@* --activate
- asdf reshim nodejs
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
Expand Down
1 change: 1 addition & 0 deletions packages/volto/news/6038.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use pnpm corepack instead of installing it in CI @sneridagh

0 comments on commit a81fa54

Please sign in to comment.