Merge pull request #88 from 06chaynes/develop #79
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: http-cache | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.ref }}-http-cache | |
cancel-in-progress: true | |
defaults: | |
run: | |
working-directory: ./http-cache | |
jobs: | |
fmt: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "rustfmt" | |
- run: cargo fmt -- --check | |
test: | |
name: Test stable on ${{ matrix.os }} | |
needs: [fmt] | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- run: | | |
cargo test --all-targets --no-default-features --features manager-cacache,cacache-async-std,with-http-types,manager-moka | |
cargo test --all-targets --no-default-features --features manager-cacache,cacache-tokio | |
clippy: | |
name: Check clippy | |
needs: [fmt, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: "clippy" | |
- run: | | |
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,cacache-async-std,with-http-types,manager-moka -- -D warnings | |
cargo clippy --lib --tests --all-targets --no-default-features --features manager-cacache,cacache-tokio -- -D warnings | |
docs: | |
name: Build docs | |
needs: [fmt, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@nightly | |
env: | |
RUSTFLAGS: --cfg docsrs | |
RUSTDOCFLAGS: --cfg docsrs -Dwarnings | |
- run: cargo doc --no-deps --document-private-items |