Add Client::set_user_agent for custom User-Agent token (#110) #358
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 | |
| tags: | |
| - v*.*.* | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| MSRV: '1.86' | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| name: Check | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.MSRV }} | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Clippy check | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: rustfmt | |
| run: cargo fmt --all --check | |
| check-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo doc | |
| env: | |
| RUSTDOCFLAGS: "-D rustdoc::all -A rustdoc::private-doc-tests" | |
| run: cargo doc --all-features --no-deps | |
| test-versions: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| rust: | |
| - stable | |
| - '1.86' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: taiki-e/install-action@protoc | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run tests | |
| run: cargo test --workspace --all-features --all-targets | |
| test-docs: | |
| needs: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Run doc tests | |
| run: cargo test --all-features --doc |