feat: modernize integration workflows and add ClickStack observability #48
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: Rust CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: rust-ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_TARGET_DIR: target | |
| RUSTFLAGS: -D warnings | |
| jobs: | |
| quality: | |
| name: quality | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.97.0 | |
| with: | |
| components: clippy,rustfmt | |
| - name: Restore Rust cache | |
| uses: Swatinem/rust-cache@v2.9.1 | |
| - name: Check formatting | |
| run: cargo fmt --all --check | |
| - name: Run Clippy | |
| run: cargo clippy --all-targets --locked -- -D warnings | |
| - name: Run full test suite | |
| run: cargo test --all-targets --locked | |
| - name: Verify standalone lazy runtime state | |
| shell: bash | |
| run: | | |
| cargo build --locked --bin cf-integration | |
| sandbox=$(mktemp -d) | |
| binary="$GITHUB_WORKSPACE/target/debug/cf-integration" | |
| if (cd "$sandbox" && CF_INTEGRATION_DIR="$sandbox/state" "$binary" conformance report); then | |
| echo "report unexpectedly succeeded without prior results" >&2 | |
| exit 1 | |
| fi | |
| test ! -e "$sandbox/state" | |
| if (cd "$sandbox" && CF_INTEGRATION_DIR="$sandbox/state" "$binary" stack config --lane external); then | |
| echo "stack config unexpectedly succeeded outside a checkout" >&2 | |
| exit 1 | |
| fi | |
| test -f "$sandbox/state/secrets.env" | |
| find "$sandbox/state/assets" \ | |
| -path '*/docker/docker-compose.cf-integration.yaml' \ | |
| -type f -print -quit | grep -q . | |
| - name: Verify published package | |
| run: cargo package --locked | |
| - name: Validate GitHub Actions workflows | |
| run: go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 | |
| native: | |
| name: native (${{ matrix.target }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| - runner: macos-15 | |
| target: aarch64-apple-darwin | |
| - runner: windows-2025 | |
| target: x86_64-pc-windows-msvc | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@1.97.0 | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Restore Rust cache | |
| uses: Swatinem/rust-cache@v2.9.1 | |
| - name: Run native tests | |
| shell: bash | |
| run: cargo test --all-targets --locked |