-
Notifications
You must be signed in to change notification settings - Fork 87
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: fix e2e report workflow missing netlify
CLI
#2673
Conversation
📊 Package size report 0%↑
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
94e28fc
to
9bf4485
Compare
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.
9bf4485
to
1c6046e
Compare
1c6046e
to
a14fb6f
Compare
ntl deploy --build --cwd e2e-report | ||
npx netlify deploy --build --cwd e2e-report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the npx
changes are because when binaries are installed locally, GitHub doesn't automatically add ./node_modules/.bin
to the PATH
. Just using npx
is the right approach I think.
npm i -g [email protected] | ||
netlify login | ||
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use | ||
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice hack :)
# https://netlify.slack.com/archives/C07686YAY13/p1718139257978049 is resolved. | ||
npm i -g [email protected] | ||
netlify login | ||
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: you could pull this out into a reusable action in github actions.
Something like .github/actions/netlify
name: 'Install Netlify CLI'
description: some description
runs:
using: 'composite'
steps:
- run: |
# Control netlify-cli as a regular dev dep but expose it globally for test fixtures to use
npm install -g "netlify-cli@$(npm list --json --depth=0 netlify-cli | jq -r ".dependencies[\"netlify-cli\"].version")"
npx netlify login
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We only install this pseudo-monorepo-package's deps in the e2e report CI workflow, not the root deps. Follow-up to #2673.
We only install this pseudo-monorepo-package's deps in the e2e report CI workflow, not the root deps. Follow-up to #2673.
Since it doesn't run on all PRs, I didn't notice it needed a slightly different config when I changed this in #2673. This workflow checks out next-runtime in one directory and next.js in another, so we need to specify a working directory.
Since it doesn't run on all PRs, I didn't notice it needed a slightly different config when I changed this in #2673. This workflow checks out next-runtime in one directory and next.js in another, so we need to specify a working directory.
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 reviving #2484, i.e. using netlify-cli as a dev dep everywhere. In cases where we're running a test fixture in another working directory, I've added a CI step that sort of "promotes" the dev dep to a global dep. It's a bit funny but I think it's a good compromise. Now netlify-cli is entirely controlled via package.json and can receive deterministic updates via Renovate like anything else.
Supersedes #2484.