-
Notifications
You must be signed in to change notification settings - Fork 4
feat: CI overhaul for nightlies and PRs #90
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
Merged
+323
−59
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1362a52
feat: overhaul CI into reusable workflow with nightly and PR triggers
redpanda-f 21ec226
Update .github/workflows/ci_nightly.yml
redpanda-f 869c873
Update .github/workflows/ci_run.yml
redpanda-f 01349c1
chore: bring down python version to 3.11.10
redpanda-f 491f655
Merge branch 'main' into feat/redpanda/ci-workflow-overhaul
redpanda-f b4e3726
update: ci_run.yml, merge main
redpanda-f File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| # Runs on a nightly schedule (and optionally via manual dispatch). | ||
| # | ||
| # Executes the full CI matrix: stability (latest tags) and frontier | ||
| # (latest branches). Both runs file GitHub issues with their results | ||
| # unless manually suppressed via workflow_dispatch inputs. | ||
|
|
||
| name: CI (Nightly) | ||
|
|
||
| on: | ||
| schedule: | ||
| # Nightly at 03:00 UTC | ||
| - cron: '0 3 * * *' | ||
| workflow_dispatch: | ||
| inputs: | ||
| reporting: | ||
| description: 'Create GitHub issue with scenario report' | ||
| type: boolean | ||
| default: false | ||
| skip_report_on_pass: | ||
| description: 'Skip filing issue when all scenarios pass' | ||
| type: boolean | ||
| default: true | ||
|
|
||
| jobs: | ||
| foc-devnet-test: | ||
| strategy: | ||
| fail-fast: false | ||
| max-parallel: 1 | ||
| matrix: | ||
| include: | ||
| - name: stability | ||
| init_flags: "--curio latesttag:pdp/v* --filecoin-services latesttag:v*" | ||
| issue_label: scenarios-run-stability | ||
| issue_title: "FOC Devnet scenarios run report (stability)" | ||
| - name: frontier | ||
| init_flags: "--curio gitbranch:pdpv0 --filecoin-services gitbranch:main" | ||
| issue_label: scenarios-run-frontier | ||
| issue_title: "FOC Devnet scenarios run report (frontier)" | ||
| uses: ./.github/workflows/ci_run.yml | ||
| with: | ||
| name: ${{ matrix.name }} | ||
| init_flags: ${{ matrix.init_flags }} | ||
| # Reporting is always on for scheduled runs; for manual dispatch it follows the input. | ||
| enable_reporting: ${{ github.event_name == 'schedule' || inputs.reporting == true }} | ||
| # On scheduled runs, such as nightly `inputs.skip_report_on_pass` is absent (empty string), so we cannot rely | ||
| # on it directly. The LHS of || short-circuits to true for any non-dispatch trigger, giving | ||
| # the desired default (skip on pass). For workflow_dispatch the LHS is false, so the user's | ||
| # choice in inputs.skip_report_on_pass takes effect. | ||
| skip_report_on_pass: ${{ github.event_name != 'workflow_dispatch' || inputs.skip_report_on_pass }} | ||
| issue_label: ${{ matrix.issue_label }} | ||
| issue_title: ${{ matrix.issue_title }} | ||
| secrets: inherit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| # Runs on every pull request targeting main, and on every merge to main. | ||
| # | ||
| # Executes lint checks, cargo tests, and a single CI run with the default | ||
| # config (no special init_flags). Issue reporting is disabled — that is | ||
| # reserved for the nightly schedule run. | ||
|
|
||
| name: CI (Pull Request) | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: ['main'] | ||
| push: | ||
| branches: ['main'] | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| components: rustfmt, clippy | ||
|
|
||
| - name: Setup Python tools | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y pipx | ||
| pipx install black | ||
| echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
|
|
||
| - name: Run linting (check mode) | ||
| run: FIX=0 ./scripts/lint.sh | ||
|
|
||
| cargo-test: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
|
||
| - name: Install build dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y pkg-config libssl-dev | ||
|
|
||
| - name: Run tests | ||
| run: cargo test --all-targets --all-features | ||
|
|
||
| foc-devnet-test: | ||
| needs: [lint, cargo-test] | ||
| uses: ./.github/workflows/ci_run.yml | ||
| with: | ||
| name: default | ||
| init_flags: '' | ||
| enable_reporting: false | ||
| secrets: inherit | ||
redpanda-f marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.