Skip to content

f Fix tests

f Fix tests #230

Workflow file for this run

name: Continuous Integration Checks
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
platform: [ ubuntu-latest ]
toolchain: [ stable, beta ]
include:
- toolchain: stable
check-fmt: true
- toolchain: 1.63.0
platform: ubuntu-latest
msrv: true
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
override: true
profile: minimal
- name: Pin crates for MSRV
if: matrix.msrv
run: |
cargo update -p proptest --precise "1.2.0" --verbose # proptest 1.3.0 requires rustc 1.64.0
cargo update -p regex --precise "1.9.6" --verbose # regex 1.10.0 requires rustc 1.65.0.
cargo update -p tokio --precise "1.38.1" --verbose # tokio v1.39.0 requires rustc 1.70 or newer
- name: Cargo check
run: cargo check --release
- name: Check documentation
run: |
cargo doc --release
cargo doc --no-default-features --features no-std
RUSTFLAGS="--cfg lsps1" RUSTDOCFLAGS="--cfg lsps1" cargo doc --release
RUSTFLAGS="--cfg lsps1" RUSTDOCFLAGS="--cfg lsps1" cargo doc --no-default-features --features no-std
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
- name: Check formatting
if: matrix.check-fmt
run: rustup component add rustfmt && cargo fmt --all -- --check
- name: Set RUSTFLAGS to deny warnings
if: "matrix.toolchain == 'stable'"
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV"
- name: Test on Rust ${{ matrix.toolchain }}
run: |
cargo test
RUSTFLAGS="--cfg lsps1" cargo test
- name: Test on Rust ${{ matrix.toolchain }} with no-std support
run: |
cargo test --no-default-features --features no-std
RUSTFLAGS="--cfg lsps1" cargo test --no-default-features --features no-std