Skip to content

Commit 0ce5df5

Browse files
authored
ci: fix e2e report workflow missing netlify CLI (#2673)
* chore(deps): use netlify-cli dev dep where possible Ubuntu 24.04 (now ubuntu-latest) has removed the `netlify` CLI :( We were installing it manually in some CI workflows, but not the e2e report one, which started failing. This fixes that by pulling in the easy parts of #2484. * ci: run next.js deps with netlify-cli dev dep
1 parent 01651dc commit 0ce5df5

File tree

8 files changed

+39796
-12470
lines changed

8 files changed

+39796
-12470
lines changed

.github/workflows/e2e-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ jobs:
5656
- name: Deploy e2e page
5757
if: success()
5858
run: |
59-
ntl deploy --build --cwd e2e-report
59+
npx netlify deploy --build --cwd e2e-report

.github/workflows/run-tests.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
else
4141
echo "matrix=[\"latest\"]" >> $GITHUB_OUTPUT
4242
fi
43+
4344
e2e:
4445
needs: setup
4546
runs-on: ubuntu-latest
@@ -68,14 +69,13 @@ jobs:
6869
deno-version: v1.37.0
6970
- name: 'Install dependencies'
7071
run: npm ci
71-
- name: 'Netlify Login'
72+
- name: 'Prepare Netlify CLI'
7273
env:
7374
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
7475
run: |
75-
# TODO(serhalp) Unpin version once
76-
# https://netlify.slack.com/archives/C07686YAY13/p1718139257978049 is resolved.
77-
npm i -g netlify-cli@17.26.0
78-
netlify login
76+
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
77+
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
78+
npx netlify login
7979
- name: Get installed Playwright version
8080
id: playwright-version
8181
run: echo "version=$(npm view @playwright/test version)" >> $GITHUB_OUTPUT
@@ -204,14 +204,13 @@ jobs:
204204
run: npm ci
205205
- name: 'Build'
206206
run: npm run build
207-
- name: 'Netlify Login'
207+
- name: 'Prepare Netlify CLI'
208208
env:
209209
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
210210
run: |
211-
# TODO(serhalp) Unpin version once
212-
# https://netlify.slack.com/archives/C07686YAY13/p1718139257978049 is resolved.
213-
npm i -g netlify-cli@17.26.0
214-
netlify login
211+
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
212+
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
213+
npx netlify login
215214
- name: Resolve Next.js version
216215
id: resolve-next-version
217216
shell: bash

.github/workflows/test-e2e.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ jobs:
180180
run: npm run build
181181
working-directory: ${{ env.runtime-path }}
182182

183-
- name: add netlify cli
184-
run: npm install -g netlify-cli
183+
- name: Prepare Netlify CLI
184+
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
185+
run: npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
185186

186187
- name: Install Playwright Browsers
187188
run: npx playwright install --with-deps

0 commit comments

Comments
 (0)