Update CI to use new msrv #867
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: [push, pull_request] | |
jobs: | |
test: | |
name: Test Rust ${{ matrix.toolchain }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
toolchain: [stable, nightly, 1.65.0] | |
os: [ubuntu, macOS, windows] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
override: true | |
- name: Remove .lock file | |
run: rm Cargo.lock | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --features testing-helpers | |
test_features_separate: | |
name: Test features | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install tomljson | |
run: go install github.com/pelletier/go-toml/cmd/tomljson | |
- name: Test | |
run: | | |
export GOBIN=$HOME/go/bin | |
export PATH=$PATH:$GOBIN | |
ci/test_all_features.sh | |
doc_test: | |
name: Doc tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install cargo-external-doc | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: --git https://github.com/JelteF/cargo-external-doc --force | |
- name: Build library | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
- name: Run cargo-external-doc | |
uses: actions-rs/cargo@v1 | |
with: | |
command: external-doc | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: clippy | |
override: true | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features -- -D warnings | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rustfmt | |
override: true | |
- name: rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
msrv: | |
# TODO: Use MSRV once it understands new `Cargo.lock` format. | |
# name: MSRV | |
name: Minimal crates versions | |
strategy: | |
fail-fast: false | |
matrix: | |
# msrv: ["1.36.0"] | |
msrv: [stable] | |
os: [ubuntu, macOS, windows] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.msrv }} | |
override: true | |
- name: Install minimal dependecies versions | |
run: cargo +nightly update -Z minimal-versions | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --features testing-helpers |