fix(ws): cancel spawned tasks on Client drop to prevent reconnect-loop leak #74
Workflow file for this run
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 | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build-test: | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| matrix: | |
| os: [ macos, windows ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: cargo build --all-targets --all-features | |
| - run: cargo test | |
| fmt-lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install stable Rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| components: clippy | |
| toolchain: '1.88' | |
| - name: Install nightly Rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| components: rustfmt | |
| toolchain: 'nightly-2025-11-24' | |
| - name: Rustfmt (nightly) | |
| # Run nightly formatting to allow group imports | |
| run: cargo +nightly-2025-11-24 fmt --all -- --check | |
| - name: Clippy (All features) | |
| run: cargo +1.88 clippy --all-targets --all-features -- -D warnings | |
| - name: Clippy | |
| run: cargo +1.88 clippy --all-targets -- -D warnings | |
| cargo-sort: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Install cargo-sort | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: 'cargo-sort' | |
| version: 'v2.0.2' | |
| - name: Check Cargo.toml sorting | |
| run: cargo sort --check | |
| test-coverage: | |
| name: build-test (ubuntu) with coverage | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install stable Rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: '1.88' | |
| components: llvm-tools-preview | |
| - name: Install cargo-llvm-cov | |
| uses: baptiste0928/cargo-install@v3 | |
| with: | |
| crate: cargo-llvm-cov | |
| - name: Test with coverage | |
| run: | | |
| cargo llvm-cov clean --workspace | |
| cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v6 | |
| if: ${{ github.repository_owner == 'Polymarket' }} | |
| with: | |
| files: lcov.info | |
| flags: rust | |
| name: rust-llvm-cov | |
| token: ${{ secrets.CODECOV_TOKEN }} |