diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d9086d..db8c609 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,15 +60,16 @@ jobs: - name: Checkout sources uses: actions/checkout@v3 + - name: Install cargo-binstall + uses: taiki-e/install-action@cargo-binstall + - name: Install cargo-msrv - uses: taiki-e/install-action@v2 - with: - tool: cargo-msrv + run: cargo binstall --version 0.16.0-beta.17 --no-confirm cargo-msrv #- uses: Swatinem/rust-cache@v1 - name: Check MSRV - run: cargo msrv verify + run: cargo msrv verify --log-target=stdout --output-format=json semver: name: Semantic Versioning @@ -80,6 +81,62 @@ jobs: - name: Check semver uses: obi1kenobi/cargo-semver-checks-action@v2 + min-versions: + name: Minimal Dependency Versions + runs-on: ubuntu-latest + needs: [lints, docs] + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install nightly toolchain + uses: dtolnay/rust-toolchain@nightly + + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - name: Install cargo-minimal-versions + uses: taiki-e/install-action@cargo-minimal-versions + + - name: Check with minimal versions + run: cargo minimal-versions check --workspace --ignore-private + + - name: Test with minimal versions + run: cargo minimal-versions test -- --test-threads 1 + + min-versions-msrv: + name: Minimal Depencency Versions (MSRV) + runs-on: ubuntu-latest + needs: [lints, docs] + env: + RUSTFLAGS: "-D warnings" + steps: + - name: Checkout sources + uses: actions/checkout@v3 + + - name: Install nightly toolchain + uses: dtolnay/rust-toolchain@nightly + + - name: Install cargo-binstall + uses: taiki-e/install-action@cargo-binstall + - name: Install cargo-msrv + run: cargo binstall --version 0.16.0-beta.17 --no-confirm cargo-msrv + - name: Install cargo-hack + uses: taiki-e/install-action@cargo-hack + - name: Install cargo-minimal-versions + uses: taiki-e/install-action@cargo-minimal-versions + + - name: Determine MSRV + run: echo "MSRV=$(cargo msrv show --output-format=minimal)" >> $GITHUB_ENV + + - name: Show MSRV + run: echo $MSRV + + - name: Install MSRV Rust version + run: rustup toolchain install $MSRV + + - name: Check with minimal versions + run: cargo +$MSRV minimal-versions check --workspace --ignore-private + lints: name: Lints runs-on: ubuntu-latest @@ -148,7 +205,7 @@ jobs: runs-on: ubuntu-latest environment: production if: github.event_name == 'release' - needs: [build, test, msrv, lints, docs, leaks, semver] + needs: [build, test, msrv, lints, docs, leaks, semver, min-versions, min-versions-msrv] steps: - name: Checkout sources uses: actions/checkout@v3 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e2b0f11..bc2467a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,3 +32,8 @@ jobs: with: files: codecov.json fail_ci_if_error: true + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: code-coverage-report + path: codecov.json diff --git a/Cargo.toml b/Cargo.toml index 44d9b95..b93b559 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,8 +58,13 @@ tokio-util = { version = "0.7.10", default-features = false, features = ["rt"] } bytes = "1.5.0" http-body-util = "0.1.0" +futures-util = "0.3.16" # Required to fix minimal-versions +tower = "0.4.1" # Required to fix minimal-versions + # Warp example -warp = "0.3.1" +warp = "0.3.6" +headers = "0.3.5" # Required to fix minimal-versions +serde_urlencoded = "0.7.1" # Required to fix minimal-versions # For testing unix signals [target.'cfg(unix)'.dev-dependencies]