Skip to content

CI: finalize Test Policy v1.0; cache & marker enforcement; keep mapping/integration non-gating#31

Merged
alpharover merged 3 commits into
trunkfrom
ci/finalize-test-policy-v1
Sep 1, 2025
Merged

CI: finalize Test Policy v1.0; cache & marker enforcement; keep mapping/integration non-gating#31
alpharover merged 3 commits into
trunkfrom
ci/finalize-test-policy-v1

Conversation

@alpharover

Copy link
Copy Markdown
Owner

Lock in Test Policy v1.0 and stabilize CI signal while keeping trunk green.

Summary

  • Core gating: build full workspace excluding alpha_mapping; run only unit tests (pytest -m unit).
  • Non‑gating:
    • Mapping Build: builds alpha_mapping on changes + nightly, uploads logs, continue-on-error: true.
    • Integration Tests: pytest -m integration on changes + nightly, continue-on-error: true.
  • Promotion rule (policy): after 7 consecutive green mapping + integration runs (PRs/nightly) or 1 week green, re‑gate them.
  • Sensors enforcement: keep relaxed policy — forbid only bad form (--cmake-args before --packages-select), allow multiline packages‑first.

What changed

  • Added apt hardening and caching to Core, Mapping, and Integration jobs:
    • Configure apt retries + noninteractive.
    • Cache rosdep metadata via actions/cache@v4.
    • Install/configure/cache ccache.
    • Wire ccache into all colcon build invocations.
  • Added “Enforce test markers” step in Core to require @pytest.mark.unit or @pytest.mark.integration on all tests.
  • Kept unit‑only pytest step as the gating test execution; no colcon test.
  • Preserved set +u/set -u around source to avoid nounset issues.
  • Maintained concurrency and non‑gating behavior for mapping/integration.

Files

  • .github/workflows/ci.yml
  • .github/workflows/sensors.yml

Expected outcome

  • Fast, stable Core CI with deterministic unit‑only gating.
  • Continued non‑gating visibility for mapping/integration with artifacts.
  • Fewer spurious CI failures due to apt/rosdep/network variability.

Follow‑up

  • After a week of green mapping/integration (or 7 consecutive runs), open a PR to promote them back into gating per policy.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment thread .github/workflows/ci.yml
Comment on lines +129 to +139
- name: Install ccache
run: sudo apt-get install -y ccache
- name: Cache ccache
uses: actions/cache@v4
with:
path: ~/.ccache
key: ccache-${{ runner.os }}-${{ hashFiles('**/CMakeLists.txt','**/*.cmake','**/package.xml') }}
restore-keys: |
ccache-${{ runner.os }}-
- name: Configure ccache
run: |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[P1] Ensure ccache directory exists before configuring

Configure ccache writes max_size = 2G to ~/.ccache/ccache.conf immediately after the cache restore. On a cold runner or any cache miss, actions/cache does not create ~/.ccache, so this echo will fail with “No such file or directory” and the job aborts before compiling. Create the directory (e.g. mkdir -p ~/.ccache) before writing the config; the mapping and integration jobs use the same pattern and would fail for the same reason.

Useful? React with 👍 / 👎.

@alpharover
alpharover merged commit 60f53b5 into trunk Sep 1, 2025
5 of 6 checks passed
@alpharover
alpharover deleted the ci/finalize-test-policy-v1 branch September 1, 2025 03:38
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