Merge pull request #45 from communityvi/renovate/lock-file-maintenance #132
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: async-time-mock | |
on: push | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check all features | |
run: cargo check --tests --all-features | |
- name: Check with default features | |
run: cargo check --tests | |
- name: Check without default features | |
run: cargo check --tests --no-default-features | |
- name: Check with only stream feature | |
run: cargo check --tests --no-default-features --features stream | |
- name: Check with only mock feature | |
run: cargo check --tests --no-default-features --features mock | |
- name: Check with only interval feature | |
run: cargo check --tests --no-default-features --features interval | |
- name: Check with mock and interval feature | |
run: cargo check --tests --no-default-features --features mock,interval | |
check-msrv: | |
name: Check with Minimum Supported Rust Version | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@1.64 | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check all features | |
run: cargo check --workspace --tests --all-features | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run clippy linter | |
run: cargo clippy --all-features --tests --workspace -- -D warnings | |
rustfmt: | |
name: Check formatting with rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --all-features | |
- name: Run tests | |
run: cargo test --all-features |