Skip to content

More idiomatic rust code #10

More idiomatic rust code

More idiomatic rust code #10

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: ${{ matrix.rust-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
rust-version:
- stable
include:
- os: ubuntu-latest
rust-version: stable 18 months ago
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- name: Test compilation
run: cargo check --all --all-targets
- name: Test formatting
run: cargo fmt --all -- --check
# - name: Test clippy
# run: cargo clippy --all --all-targets -- -D warnings
# - name: Test documentation
# run: cargo doc --all --no-deps
- name: Test unit tests
run: cargo test --all-features