Harden short-yield terminal output capture #494
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: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_DENY_VERSION: 0.19.4 | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| rust: | |
| name: Rust (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup toolchain install stable --profile minimal --component clippy,rustfmt | |
| rustup default stable | |
| - name: Verify Rust toolchain | |
| run: | | |
| rustup --version | |
| rustup show | |
| cargo --version | |
| cargo clippy --version | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache Cargo build outputs | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| cache-bin: false | |
| - name: Check formatting | |
| if: matrix.os == 'ubuntu-latest' | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --locked --all-targets -- -D warnings | |
| - name: Run tests | |
| run: cargo test --locked | |
| dependency-policy: | |
| name: Dependency policy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| run: | | |
| rustup toolchain install stable --profile minimal | |
| rustup default stable | |
| - name: Install cargo-deny | |
| run: cargo install cargo-deny --locked --version "$CARGO_DENY_VERSION" | |
| - name: Check dependency policy and licenses | |
| run: cargo deny --locked check bans sources licenses |