Skip to content

ci: trigger Build and Test once FormalityCheck passed - #29860

Merged
BKPepe merged 1 commit into
openwrt:masterfrom
BKPepe:feature/webhook-wait-action
Jun 30, 2026
Merged

ci: trigger Build and Test once FormalityCheck passed#29860
BKPepe merged 1 commit into
openwrt:masterfrom
BKPepe:feature/webhook-wait-action

Conversation

@BKPepe

@BKPepe BKPepe commented Jun 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@openwrt

openwrt Bot commented Jun 29, 2026

Copy link
Copy Markdown

Formality Check: Suggestions Available

We completed the verification flow. Please review the formatting overview logs below.

⚠️ STYLISTIC WARNINGS & SUGGESTIONS

Commit 332f413:

  • ⚠️ Subject line exceeds soft limit (61/60 chars)

Something broken? Consider reporting an issue.
Running version e12df3b deployed on 2026-06-29 13:01:52 CEST

@BKPepe
BKPepe force-pushed the feature/webhook-wait-action branch from e6b40d4 to 5e93568 Compare June 29, 2026 10:56
- 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>
@BKPepe

BKPepe commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@GeorgeSapkin Any thoughts?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_suite to pull_request.
  • Add a “wait-for-formalities” job that blocks until FormalityCheck / Git & Commits completes.
  • Make the build job depend on the new wait job and add checks: read permission for check-run polling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 3 to 5
on:
check_suite:
types: [completed]
pull_request:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +12 to +15
wait-for-formalities:
name: Wait for FormalityCheck
runs-on: ubuntu-slim
steps:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to add timeout-minutes: 30 here:

@BKPepe

BKPepe commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

Yay, my friend Copilot is back! :)

@orangepizza

Copy link
Copy Markdown
Contributor

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.

@BKPepe

BKPepe commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

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 am slowly rolling out openwrt-bot to catch formal issues, linting, etc., right at the beginning. However, the biggest consumer of GitHub runners is the main core repository, which uses significantly more resources than any other feed. I would like to have this workflow polished in the community-driven feeds first, before moving it over to the main repo.

@orangepizza

Copy link
Copy Markdown
Contributor

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.

@BKPepe

BKPepe commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is FormalityCheck / Git & Commits coming from?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@BKPepe

BKPepe commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

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.

@BKPepe
BKPepe merged commit b73e173 into openwrt:master Jun 30, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants