fix(acp): Handle incoming EOF correctly #696
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] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "ci-${{ github.ref }}" | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| msrv: | |
| name: Minimum supported Rust version | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| - name: Read MSRV from Cargo.toml | |
| id: msrv | |
| run: | | |
| msrv="$(sed -n 's/^rust-version[[:space:]]*=[[:space:]]*"\([^"]*\)".*/\1/p' Cargo.toml)" | |
| test -n "$msrv" | |
| echo "version=$msrv" >> "$GITHUB_OUTPUT" | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 | |
| with: | |
| toolchain: ${{ steps.msrv.outputs.version }} | |
| - name: Check with MSRV | |
| run: cargo check --workspace --all-targets --all-features --locked | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 | |
| with: | |
| toolchain: nightly,stable | |
| components: rustfmt,clippy | |
| - name: Check formatting | |
| run: cargo fmt -- --check | |
| - name: Check for typos | |
| uses: crate-ci/typos@bee27e3a4fd1ea2111cf90ab89cd076c870fce14 | |
| with: | |
| config: ./typos.toml | |
| - name: Lint | |
| run: | | |
| cargo clippy | |
| cargo clippy --all-targets --all-features | |
| - name: Build | |
| run: cargo build --all-targets --all-features | |
| - name: Check docs.rs build | |
| env: | |
| RUSTDOCFLAGS: --cfg docsrs | |
| run: cargo +nightly doc -p agent-client-protocol --all-features --no-deps | |
| - name: Install just | |
| uses: taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3 | |
| with: | |
| tool: just | |
| - name: Run tests | |
| run: just test | |
| feature-powerset: | |
| name: Feature powerset (${{ matrix.partition }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| partition: | |
| - "1/8" | |
| - "2/8" | |
| - "3/8" | |
| - "4/8" | |
| - "5/8" | |
| - "6/8" | |
| - "7/8" | |
| - "8/8" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 | |
| with: | |
| toolchain: stable | |
| - name: Install cargo-hack | |
| uses: taiki-e/install-action@4684b8405694ae9dd42c9f39ba901a70ae83f4a3 | |
| with: | |
| tool: cargo-hack | |
| - name: Check feature powerset | |
| # `default` is empty and `unstable` is an aggregate alias for the | |
| # individual unstable_* features, so excluding both avoids checking | |
| # duplicate combinations. The regular CI all-features build still covers | |
| # the aggregate feature. | |
| run: cargo hack check --workspace --feature-powerset --exclude-features default,unstable --no-dev-deps --partition ${{ matrix.partition }} |