name: Test
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test (${{ matrix.os }}, ${{ matrix.rust }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, beta]
include:
- os: ubuntu-latest
rust: nightly
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - uses: tylerbutler/actions/setup-rust@2189c2e4cd75378b6db8b68ba451bf74d0975c4a with:
toolchain: ${{ matrix.rust }}
- name: Run tests (all features)
run: cargo test --all-features
- name: Run tests (rustls feature)
run: cargo test --no-default-features --features rustls
msrv:
name: MSRV Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Get MSRV from Cargo.toml
id: msrv
run: |
MSRV=$(grep '^rust-version' Cargo.toml | cut -d'"' -f2)
echo "version=$MSRV" >> "$GITHUB_OUTPUT"
- uses: tylerbutler/actions/setup-rust@2189c2e4cd75378b6db8b68ba451bf74d0975c4a with:
toolchain: ${{ steps.msrv.outputs.version }}
- run: cargo check --all-features