Release 11.3.0. #325
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: | |
pull_request: | |
push: | |
env: | |
RUSTFLAGS: -Dwarnings | |
jobs: | |
precheck_default: | |
name: Check default | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all --bins --examples --lib | |
precheck_all_features: | |
name: Check all features | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all --bins --examples --tests --lib | |
check_msrv: | |
needs: [precheck_default, precheck_all_features] | |
name: Check MSRV with all features | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install MSRV toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.65.0 | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all --bins --examples --tests --lib | |
check_benches: | |
needs: [precheck_default, precheck_all_features] | |
name: Check benches with all features | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
rust: [ nightly ] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all --bins --benches --examples --tests --lib | |
check_sync_readme: | |
needs: [precheck_default, precheck_all_features] | |
name: Check sync readme | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
rust: [ stable ] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Install cargo-sync-readme | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-sync-readme | |
- name: Sync readme check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: sync-readme | |
args: --check | |
check_platform_compatibility: | |
needs: [precheck_default, precheck_all_features] | |
name: Check platform compatibility | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
rust: [stable] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all --bins --examples --tests --lib | |
check_cli: | |
needs: [ precheck_default, precheck_all_features ] | |
name: Check CLI | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
rust: [ stable ] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: CLI | |
uses: GuillaumeFalourd/assert-command-line-output@v2 | |
with: | |
command_line: cargo run -- p = 2\; p + 3 | |
contains: 5 | |
expected_result: PASSED | |
detailed_tests: | |
needs: [precheck_default, precheck_all_features] | |
name: Check, test, doc, format and lint with all features | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
rust: [stable, beta, nightly] | |
steps: | |
- uses: actions/checkout@master | |
- name: Install ${{ matrix.rust }} | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
components: rustfmt, clippy | |
override: true | |
- name: Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all-features --all --bins --examples --tests --lib | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --all | |
- name: Docs | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --all-features | |
- name: Format | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
- name: Lint | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features --bins --examples --tests --lib | |
coveralls_io: | |
needs: [detailed_tests] | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: ⚡ Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
default: true | |
- name: Install nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
default: false | |
- name: Install cargo-tarpaulin | |
uses: actions-rs/install@v0.1 | |
with: | |
crate: cargo-tarpaulin | |
version: latest | |
use-tool-cache: true | |
- name: Coverage Report with tarpaulin | |
uses: actions-rs/cargo@v1 | |
with: | |
command: tarpaulin | |
args: --all-features --out Lcov --tests --doc -- --test-threads 1 | |
- name: Upload Coverage | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info |