Skip to content

Commit

Permalink
only checked changed CRDs
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <[email protected]>
  • Loading branch information
sebhoss committed Nov 4, 2023
1 parent 378008f commit 6811c80
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Check Code Generator
run: cargo check --package code-generator --locked
- name: Check all CRDs
- name: Check changed CRDs
run: |
for mld in ./kube-custom-resources-rs/src/*; do
if [ -f "${mld}/mod.rs" ]; then
module=$(basename "${mld}")
echo "testing ${module}"
cargo check --package kube-custom-resources-rs --features "${module}" --locked
fi
for module in $(git diff --name-only origin/main -- ./kube-custom-resources-rs/src | grep --invert-match lib.rs | xargs --no-run-if-empty -I{} dirname {} | sort --unique | xargs --no-run-if-empty -I{} basename {}); do
echo "testing ${module}"
cargo check --package kube-custom-resources-rs --features "${module}" --locked
done
env:
RUSTFLAGS: "-A warnings"

0 comments on commit 6811c80

Please sign in to comment.