Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use corepack instead of pnpm/action-setup #8926

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/actions/pnpm-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ runs:
with:
node-version: ${{ inputs.node-version }}

# https://pnpm.io/continuous-integration#github-actions
# Uses `packageManagement` field from package.json
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
dest: ${{ runner.tool_cache }}/pnpm
# Use `@pnpm/exe` for Node 16
standalone: ${{ inputs.node-version == '16' }}
- name: Enable corepack
shell: bash
run: |
corepack enable

- name: Get pnpm store directory
id: pnpm-cache
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/reusable-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ jobs:
with:
node-version: 20

- name: Calculate Node Bin Path
id: calculate-node-bin-path
shell: bash
run: |
NODE_BIN_PATH=$(dirname $(which node))
echo "path=$NODE_BIN_PATH" >> $GITHUB_OUTPUT

- name: Run e2e
uses: ./.github/actions/docker-run
with:
Expand All @@ -279,9 +286,9 @@ jobs:
image: mcr.microsoft.com/playwright:v1.47.0-jammy
# .cache is required by download artifact, and mount in ./.github/actions/docker-run
# .tool_cache is required by pnpm
options: -v ${{ runner.tool_cache }}:$HOME/.tool_cache
options: -v ${{ runner.tool_cache }}:${{runner.tool_cache}}
script: |
export PATH=$HOME/.tool_cache/pnpm/node_modules/.bin:$PATH
export PATH=${{ steps.calculate-node-bin-path.outputs.path }}:$PATH
pnpm run build:js
pnpm run test:e2e

Expand Down
Loading