ci: trigger Build and Test once FormalityCheck passed - #29860
Conversation
Formality Check: Suggestions AvailableWe completed the verification flow. Please review the formatting overview logs below.
|
e6b40d4 to
5e93568
Compare
- Change trigger back to pull_request to ensure it runs correctly on fork PRs - Add a wait-for-formalities job that polls the GITHUB_TOKEN for FormalityCheck status - Execute the feeds package test build only when the formalities check succeeds Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
5e93568 to
332f413
Compare
|
@GeorgeSapkin Any thoughts? |
There was a problem hiding this comment.
Pull request overview
This PR updates the CI entrypoint for the “Test and Build” workflow so that it runs on pull_request events and gates the reusable multi-arch build job on a specific FormalityCheck check-run completing.
Changes:
- Switch workflow trigger from
check_suitetopull_request. - Add a “wait-for-formalities” job that blocks until
FormalityCheck / Git & Commitscompletes. - Make the build job depend on the new wait job and add
checks: readpermission for check-run polling.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| check_suite: | ||
| types: [completed] | ||
| pull_request: | ||
|
|
There was a problem hiding this comment.
This is already done in the actions-shared-workflows:
https://github.com/openwrt/actions-shared-workflows/blob/4a5f62094fdce61592d4e94e211cb2a7566e23ef/.github/workflows/multi-arch-test-build.yml#L18
| wait-for-formalities: | ||
| name: Wait for FormalityCheck | ||
| runs-on: ubuntu-slim | ||
| steps: |
There was a problem hiding this comment.
I don't think it makes sense to add timeout-minutes: 30 here:
-
The
ubuntu-slim(1 vCPU) runner has a hard execution limit of 15 minutes anyway:
https://github.blog/changelog/2025-10-28-1-vcpu-linux-runner-now-available-in-github-actions-in-public-preview/ -
This job only polls and waits for the formality check, which should normally complete within a minute. If it gets stuck or fails, we want it to fail early to free up the runner resources rather than keeping it running.
|
Yay, my friend Copilot is back! :) |
|
would it make sense to defer tests for other architectures until until tests for x64(and/or some other major architecture) passed for package repos? I think doing so reduce load from build testing that destined to fail on every architecture, and I don't think things in package repo mostly not depend on cpu architecture most of time. |
|
I think there might be a slight misunderstanding. The CI builds are currently passing fine, as you can see in this pull request. Completely deferring or disabling tests for other architectures until certain packages are fixed wouldn't be very helpful. If tests fail on specific platforms, we need to see those failures to know what needs to be fixed. Deferring them would just hide these architectural issues. What often happens during test runs is that we enforce a generic version check, which might fail on platforms with run testing. However, this definitely doesn't mean the build is "destined to fail" across the board. It simply means it's up to the package maintainer to manually adjust the test or the package configuration when the generic solution doesn't fit. Regarding the CI load: |
|
I assumed main branch will be always pass it fine, so I though for PRs it could save cpu time for running for single arch first because there's less architecture dependent thing. |
|
Well, maybe something like openwrt/actions-shared-workflows#128 will be what you're looking for. |
| uses: lewagon/wait-on-check-action@v1.8.0 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
| check-name: 'FormalityCheck / Git & Commits' |
There was a problem hiding this comment.
Where is FormalityCheck / Git & Commits coming from?
There was a problem hiding this comment.
It's a new thing that I introduced in cooperation with @Ansuel. It will be publicly available to see in this repo https://github.com/openwrt/openwrt-bot-worker shortly. It's an integrated webhook that gives you almost instant feedback. I originally wanted to write it as a PHP script, but it's done in JavaScript.
Compared to using a GitHub runner, it's incredibly fast because it doesn't have to wait for a runner to boot up or for available runner capacity. Right after creating a pull request, the user gets feedback based on three checks, which I'd like to expand in the future. Essentially, it does the same thing as your HyperStickler, but it's much more powerful and modular.
What you're looking for is right here:
https://github.com/openwrt/openwrt-bot-worker/blob/96551fca7cda708512c1af0459d46b152d00c223/cloudflare-worker/src/index.js#L304
|
Okay, for now, I am merging this as it is. Because build runs are not working on PRs right now, bcs of me and this one should fix this. |
No description provided.