[codex] Add conformance automation and SDK hardening #95
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: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| rust: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-deny | |
| run: cargo install cargo-deny --locked | |
| - name: Cargo fmt (strict) | |
| run: cargo fmt --all -- --check | |
| - name: Cargo clippy (strict) | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Cargo deny (strict) | |
| run: cargo deny check -D warnings | |
| - name: Cargo test (all features) | |
| run: cargo test --all-features --all-targets | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-llvm-cov | |
| run: cargo install cargo-llvm-cov | |
| - name: Generate coverage (lcov) | |
| run: cargo llvm-cov --all-features --lcov --output-path lcov.info | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| disable_search: true | |
| files: lcov.info | |
| fail_ci_if_error: false | |
| msrv: | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain (MSRV) | |
| uses: dtolnay/[email protected] | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cargo check (MSRV) | |
| run: cargo check --all-targets --all-features | |
| docsrs: | |
| name: Docs.rs Build | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTDOCFLAGS: "--cfg docsrs -D warnings" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Build public docs | |
| run: cargo doc --workspace --all-features --no-deps | |
| semver: | |
| name: Public API Semver | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check rust-genai semver | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: rust-genai | |
| - name: Check rust-genai-types semver | |
| uses: obi1kenobi/cargo-semver-checks-action@v2 | |
| with: | |
| package: rust-genai-types |