Skip to content

ci: route pushes to main by what they changed - #91

Merged
spydisec merged 1 commit into
mainfrom
ci/route-main-pushes
Nov 11, 2026
Merged

spydisec merged 1 commit into
mainfrom
ci/route-main-pushes

Conversation

@spydisec

Copy link
Copy Markdown
Owner

Summary: a push to main now runs only the tests for the files it changed, like a PR does. Until now every push to main ran the full suite, so a README change booted four VMs and loaded rules into six kernels.

Changes

  • Pushes to main: changes.yml diffs the commit before the push with the new one and routes it through scripts/dev/ci-changes.bash. Every merge is a squash of a PR that already ran those tests.
  • Weekly full run: the integration and lint workflows also run on Mondays at 03:17 UTC and when started by hand. That keeps a full run even when nothing was pushed, and it catches a changed runner or cloud image.
  • Workflow files: a workflow file selects only the tests it runs, e.g. integration.yml selects the kernel, VM and container jobs. Only changes.yml and the routing script select the full suite.
  • Other files:
    • .gitignore and the ruleset files select nothing. They ran the full suite before.
    • config/wazuh/ selects lint, Bats and packaging.
    • tests/lint.sh selects lint.

ADR 0021 said that pushes to main run the full suite, so it has a dated note.

What still runs the kernel, VM and container jobs

Changes to scripts/ (outside scripts/dev/), rules/*.rules, config/auditd/, tests/ci/, integration.yml, and any shell, AWK, rule or conf file elsewhere.

Tested

tests/bats/ci-changes.bats has two new tests for the new rules. This PR changes changes.yml, so it runs the full suite itself.

Every push to main ran the full suite, so a README change booted four VMs and
loaded rules into six kernels. A push is now routed by the files it changed,
like a PR. Every merge is a squash of a PR that already ran those tests.

- A push to main diffs the commit before it with the new one. A scheduled run,
  a manual run, and a push with no known earlier commit run everything.
- The integration and lint workflows also run weekly and by hand, so the full
  suite still runs when nothing was pushed.
- A workflow file selects only the tests it runs. Only changes.yml and the
  routing script select the full suite.
- .gitignore and the ruleset files select nothing, config/wazuh selects lint,
  Bats and packaging, and tests/lint.sh selects lint.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 15657687-0bba-41d9-86a3-151bb64bff24
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@spydisec
spydisec merged commit 6dd2503 into main Nov 11, 2026
30 checks passed
@spydisec
spydisec deleted the ci/route-main-pushes branch November 11, 2026 23:32
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.

1 participant