add cd #4
This file contains hidden or 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
| name: CI | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| name: ${{ matrix.platform }} / test | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Configure toolchain | |
| run: | | |
| rustup toolchain install --profile minimal --no-self-update stable | |
| rustup default stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Configure toolchain | |
| run: | | |
| rustup toolchain install --profile minimal --no-self-update stable | |
| rustup default stable | |
| rustup component add clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-targets --all-features | |
| kubeconform: | |
| name: Lint Kubernetes manifests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install kubeconform | |
| run: | | |
| curl -fsSL https://github.com/yannh/kubeconform/releases/latest/download/kubeconform-linux-amd64.tar.gz \ | |
| | tar xz -C /usr/local/bin kubeconform | |
| - run: kubeconform -strict -summary operator.yaml | |
| tests-pass: | |
| if: always() | |
| name: Tests pass | |
| needs: [test, clippy, kubeconform] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |