Update tower-http requirement from 0.5 to 0.6 #62
This file contains 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: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [master] | |
tags: ["*"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
audit: | |
name: Audit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install `cargo-audit` | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-audit | |
- name: Run Audit | |
run: cargo audit -D warnings | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Rust Rustfmt | |
run: cargo fmt --check | |
clippy: | |
name: Clippy ${{ matrix.features.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
- { features: "" } | |
- { name: "(`tls-rustls`)", features: --features tls-rustls } | |
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | |
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | |
- { name: "(`--all-features`)", features: --all-features, openssl: true } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
if: matrix.features.openssl == true | |
run: sudo apt-get install pkg-config libssl-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run Clippy | |
run: cargo clippy --all-targets ${{ matrix.features.features }} -- -D warnings | |
rustdoc: | |
name: Rustdoc ${{ matrix.rust.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- { version: stable } | |
- { name: "with `cfg(docsrs)`", version: nightly, flags: --cfg=docsrs } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
run: sudo apt-get install pkg-config libssl-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust.version }} | |
- name: Run Rustdoc | |
env: | |
RUSTDOCFLAGS: -D warnings ${{ matrix.rust.flags }} | |
run: cargo doc --no-deps --document-private-items --lib --examples --all-features | |
build: | |
name: Build ${{ matrix.rust.name }} ${{ matrix.features.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- { version: stable, msrv: false } | |
- { name: "MSRV", version: 1.66, msrv: true } | |
features: | |
- { features: "" } | |
- { name: "(`tls-rustls`)", features: --features tls-rustls } | |
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | |
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | |
- { name: "(`--all-features`)", features: --all-features, openssl: true } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
if: matrix.features.openssl == true | |
run: sudo apt-get install pkg-config libssl-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust.version }} | |
- name: Fix MSRV dependencies | |
if: matrix.rust.msrv == true | |
run: | | |
cargo update -p tokio --precise 1.38.1 | |
cargo update -p tokio-util --precise 0.7.11 | |
- name: Run Cargo Build | |
run: cargo build ${{ matrix.features.features }} | |
test: | |
name: Test ${{ matrix.features.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
- { features: "" } | |
- { name: "(`tls-rustls`)", features: --features tls-rustls } | |
- { name: "(`rustls/ring`)", features: "--features tls-rustls-no-provider,rustls/ring" } | |
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | |
- { name: "(`--all-features`)", features: --all-features, openssl: true } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
if: matrix.features.openssl == true | |
run: sudo apt-get install pkg-config libssl-dev | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run Cargo Tests | |
run: cargo test --all-targets ${{ matrix.features.features }} --no-fail-fast | |
- name: Rust Documentation Tests | |
run: cargo test --doc ${{ matrix.features.features }} --no-fail-fast | |
minimal-versions: | |
name: Minimal Versions ${{ matrix.features.name }} | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: minimal-versions | |
strategy: | |
fail-fast: false | |
matrix: | |
features: | |
- { features: "" } | |
- { name: "(`tls-rustls`)", features: --features tls-rustls } | |
- { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } | |
- { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } | |
- { name: "(`--all-features`)", features: --all-features, openssl: true } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install OpenSSL | |
if: matrix.features.openssl == true | |
run: | | |
sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu focal-updates main" | |
sudo apt update | |
sudo apt-get install --allow-downgrades pkg-config libssl-dev=1.1.1f-1ubuntu2.23 | |
- name: Install Nightly Rust | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Update to Minimal Versions | |
run: cargo update -Zminimal-versions | |
- name: Install Rust | |
uses: dtolnay/[email protected] | |
- name: Run Cargo Build | |
run: cargo build ${{ matrix.features.features }} |