Update upstream specifications to their latest version #250
This file contains 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
# SPDX-FileCopyrightText: The kube-custom-resources-rs Authors | |
# SPDX-License-Identifier: 0BSD | |
name: Verify Commits | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
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 changed CRDs | |
run: | | |
all_good=yes | |
for feature in $(git diff --name-only origin/main -- ./kube-custom-resources-rs/src | grep --invert-match lib.rs | xargs --no-run-if-empty -I{} dirname {} | xargs --no-run-if-empty -I{} dirname {} | xargs --no-run-if-empty -I{} basename {} | sort --unique); do | |
echo "trying to test ${feature}" | |
if [ -f "./kube-custom-resources-rs/src/${feature}/mod.rs" ]; then | |
if ! ./code-generator/test-custom-resources.sh "${feature}"; then | |
all_good=no | |
fi | |
fi | |
done | |
if [ "${all_good}" == no ]; then | |
echo 'we encountered test failures' | |
exit 1 | |
fi | |
env: | |
RUSTFLAGS: "--deny warnings" |