Skip to content

fix(ci): pin tokio to 1.38.1 on MSRV step #431

fix(ci): pin tokio to 1.38.1 on MSRV step

fix(ci): pin tokio to 1.38.1 on MSRV step #431

name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- version: stable # STABLE
clippy: true
- version: 1.63.0 # MSRV
features:
- default
- blocking
- blocking-https
- blocking-https-rustls
- blocking-https-native
- blocking-https-bundled
- async
- async-https
- async-https-native
- async-https-rustls
- async-https-rustls-manual-roots
steps:
- uses: actions/checkout@v3
- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}
- name: Set default toolchain
run: rustup default ${{ matrix.rust.version }}
- name: Set profile
run: rustup set profile minimal
- name: Add clippy
if: ${{ matrix.rust.clippy }}
run: rustup component add clippy
- name: Update toolchain
run: rustup update
- name: pin dependencies
if: matrix.rust.version == '1.63.0'
run: |
cargo update -p zstd-sys --precise "2.0.8+zstd.1.5.5"
cargo update -p time --precise "0.3.20"
cargo update -p home --precise 0.5.5
cargo update -p url --precise "2.5.0"
cargo update -p tokio --precise "1.38.1"
- name: Build
run: cargo build --features ${{ matrix.features }} --no-default-features
- name: Clippy
if: ${{ matrix.rust.clippy }}
run: cargo clippy --all-targets --features ${{ matrix.features }} --no-default-features -- -D warnings
- name: Test
run: cargo test --features ${{ matrix.features }} --no-default-features -- --test-threads=1