Skip to content

Commit e3d4677

Browse files
committed
fix(ci): inline nodejs setup in run-e2e-tests action
uses: cannot contain any expression (not even github.action_path), so a composite action can't reference a sibling local action by a dynamic path. Inline the pnpm/node setup steps directly instead of delegating to setup-nodejs, and revert setup-nodejs's now-unused working-directory input. Signed-off-by: Fluent Crafter <205769460+fluentcrafter@users.noreply.github.com>
1 parent 3ce8baf commit e3d4677

2 files changed

Lines changed: 21 additions & 16 deletions

File tree

.github/actions/run-e2e-tests/action.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,27 @@ runs:
7373
if: ${{ inputs.e2e-tests-with-ssh == 'true' }}
7474
uses: lhotari/action-upterm@b0357f23233f5ea6d58947c0c402e0631bab7334 #v1
7575

76-
- name: Setup nodejs environment
77-
uses: ${{ github.action_path }}/../setup-nodejs
76+
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
77+
name: setup-pnpm
7878
with:
79-
working-directory: ${{ inputs.working-directory }}
80-
pnpm-install-options: '-F contracts -F "e2e..." --frozen-lockfile --prefer-offline'
81-
commands: |
82-
pnpm run -F "e2e^..." build
79+
package_json_file: ${{ inputs.working-directory }}/package.json
80+
81+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
82+
name: setup-nodejs
83+
with:
84+
node-version-file: ${{ inputs.working-directory }}/.nvmrc
85+
cache: 'pnpm'
86+
cache-dependency-path: ${{ inputs.working-directory }}/pnpm-lock.yaml
87+
88+
- name: pnpm install
89+
shell: bash
90+
working-directory: ${{ inputs.working-directory }}
91+
run: pnpm i -F contracts -F "e2e..." --frozen-lockfile --prefer-offline
92+
93+
- name: Build e2e deps
94+
shell: bash
95+
working-directory: ${{ inputs.working-directory }}
96+
run: pnpm run -F "e2e^..." build
8397

8498
- name: Login to Docker Hub
8599
if: ${{ inputs.dockerhub_username != '' && inputs.dockerhub_token != '' }}

.github/actions/setup-nodejs/action.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ inputs:
1515
pnpm run build:libs
1616
required: false
1717
default: ''
18-
working-directory:
19-
description: 'Directory (relative to github.workspace) containing package.json/.nvmrc/pnpm-lock.yaml'
20-
required: false
21-
default: '.'
2218

2319
outputs:
2420
node-version:
@@ -33,15 +29,12 @@ runs:
3329
steps:
3430
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
3531
name: setup-pnpm
36-
with:
37-
package_json_file: ${{ inputs.working-directory }}/package.json
3832

3933
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4034
name: setup-nodejs
4135
with:
42-
node-version-file: ${{ inputs.working-directory }}/.nvmrc
36+
node-version-file: .nvmrc
4337
cache: 'pnpm'
44-
cache-dependency-path: ${{ inputs.working-directory }}/pnpm-lock.yaml
4538

4639
- id: versions
4740
name: Capture versions
@@ -51,12 +44,10 @@ runs:
5144
echo "pnpm=$(pnpm -v)" >> "$GITHUB_OUTPUT"
5245
5346
- name: pnpm install
54-
working-directory: ${{ inputs.working-directory }}
5547
run: pnpm i ${{ inputs.pnpm-install-options }}
5648
shell: bash
5749

5850
- name: Run post-install commands
5951
if: inputs.commands != ''
60-
working-directory: ${{ inputs.working-directory }}
6152
shell: bash
6253
run: ${{ inputs.commands }}

0 commit comments

Comments
 (0)