Skip to content

Add CI workflow to run clippy and tests on all PRs - #12

Merged
popen2 merged 5 commits into
mainfrom
claude/ci-tests-clippy-prs-Nk3Uq
May 28, 2026
Merged

popen2 merged 5 commits into
mainfrom
claude/ci-tests-clippy-prs-Nk3Uq

Conversation

@popen2

@popen2 popen2 commented May 28, 2026

Copy link
Copy Markdown
Member

Also remove the orphaned tests/openapi.rs, which referenced the
openapi module deleted in 9f64cc1 and broke cargo test --all-features.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju

claude added 5 commits May 28, 2026 16:51
Also remove the orphaned tests/openapi.rs, which referenced the
openapi module deleted in 9f64cc1 and broke `cargo test --all-features`.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
Extract clippy + test into a reusable test.yml that runs the cargo-hack
feature powerset (no features, all features, and every subset). Both the
PR workflow and the release workflow now call it, so releases run the same
checks before publishing.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
Add a profile matrix (debug/release) to the reusable test workflow so
clippy and tests cover every feature subset in both build profiles.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
Drop the separate pr.yaml wrapper and add the pull_request trigger to the
reusable test workflow, which still exposes workflow_call for releases.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
@popen2
popen2 merged commit 6d0f6e0 into main May 28, 2026
3 checks passed
@popen2
popen2 deleted the claude/ci-tests-clippy-prs-Nk3Uq branch May 28, 2026 17:08
Comment on lines +10 to +12
uses: ./.github/workflows/test.yml

publish:
Comment on lines +9 to +32
name: 🧪 Test (${{ matrix.profile }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile:
- debug
- release
steps:
- name: 🛠 Checkout
uses: actions/checkout@v4

- name: 🔧 Install cargo-hack
uses: taiki-e/install-action@v2
with:
tool: cargo-hack

- name: 📦 Cargo clippy (feature powerset)
run: |
cargo hack clippy --feature-powerset ${{ matrix.profile == 'release' && '--release' || '' }} -- -D warnings

- name: 🧪 Cargo test (feature powerset)
run: |
cargo hack test --feature-powerset ${{ matrix.profile == 'release' && '--release' || '' }}
popen2 added a commit that referenced this pull request May 28, 2026
Addresses CodeQL findings on the test and release workflows (PR #12
review): neither declared an explicit permissions block, so GITHUB_TOKEN
defaulted to broader access than needed. The workflows only need to
checkout the repo; cargo publish uses CARGO_REGISTRY_TOKEN, not the
default token.

https://claude.ai/code/session_01BzqC31UjuAPBM2H7hfzdju
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants