-
Notifications
You must be signed in to change notification settings - Fork 9.6k
misc: simplify release process, run package-test in CI #13212
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
Conversation
.github/workflows/package-test.yml
Outdated
| pull_request: # run on all PRs, not just PRs to a particular branch | ||
|
|
||
| jobs: | ||
| if: contains(github.context.payload.pull_request.title, '/^v\d+\.\d+\.\d+/') |
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.
Probably just want to run this on the release PRs. thoughts?
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.
Probably just want to run this on the release PRs. thoughts?
one option would be to run it on every PR but with --dry-run or whatever for non-release PRs
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.
also we'd probably want some kind of workflow_run to run it only after everything else is green?
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.
ok so it took 9m, and the longest tests took 10m and 15m, so running all the time seems ok. And, always best to fix errors as they happen instead of pushing it off until the release manager is busy with release stuff.
--dry-run
like yarn build-all && npm pack --dry-run, just to list what files would be published?
workflow_run
granted I didn't spend long looking at this, but seems a bit complicated / not worth since the test wouldn't be the longest
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.
workflow_run
granted I didn't spend long looking at this, but seems a bit complicated / not worth since the test wouldn't be the longest
I thought you were proposing moving publishing to an action. Never mind :)
| - run: yarn build-report | ||
| - run: sudo apt-get install xvfb | ||
|
|
||
| - run: xvfb-run --auto-servernum bash $GITHUB_WORKSPACE/lighthouse-core/scripts/release/package-test.sh |
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.
can we inline package-test.sh here? It's pretty awkward in a separate script and if the intent is to not run it locally...
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.
It's a lot of bash, I prefer it being in the script, and it is nicer to test changes to it localy vs in GHA push/wait process.
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.
It's a lot of bash, I prefer it being in the script, and it is nicer to test changes to it localy vs in GHA push/wait process.
well if you feel strongly that's fine, but IMO all the bash-isms make it look a lot more involved than it is :)
name: package-test
on:
push:
branches: [master]
pull_request: # run on all PRs, not just PRs to a particular branch
jobs:
package-test:
runs-on: ubuntu-latest
name: Package Test
steps:
- name: git clone
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn install --frozen-lockfile --network-timeout 1000000
- run: yarn build-report
- run: sudo apt-get install xvfb
- run: npm pack
- name: Get latest package version
run: echo "VERSION=$(echo node -e "console.log(require('./package.json').version)")" >> $GITHUB_ENV
- run: yarn static-server &
- name: Fresh install of packed Lighthouse
working-directory: ./lighthouse-local-test
run: |
npm init -y
npm install "$GITHUB_WORKSPACE/lighthouse-$VERSION.tgz"
npm install lighthouse-plugin-publisher-ads
- name: Fast run
working-directory: ./lighthouse-local-test
run: npm explore lighthouse -- npm run fast -- http://example.com
- name: Packaged smoke test
working-directory: ./lighthouse-local-test
# Test packaged smokehouse/lighthouse using root's static-server and test fixtures.
run: xvfb-run --auto-servernum yarn smokehouse --tests-path="$GITHUB_WORKSPACE/lighthouse-cli/test/smokehouse/test-definitions/core-tests.js" --retries=2(ish)
docs/releasing.md
Outdated
| ### Release publicity | ||
|
|
||
| Note: actively undergoing changes by @exterkamp and @egsweeny. | ||
| Note 2: Not really. Ignore this. |
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.
just delete the section?
This should reduce most of the burden of doing releases.
The local release testing consist(ed) of:
yarn test,yarn build-all, etc. in a local "pristine" environment. This is basically what CI does already.yarn smoke. This verifies our published code doesn't have an accidental reliance on a dev dependency.1 is a waste of time, so I removed it.
2 could be done in GHA, so let's do it there.
3 remains.
ref #11734