From d46a9a0dde3f12f303d229bdf8616a3f5ba409a1 Mon Sep 17 00:00:00 2001 From: Lorenzo Leonardo Date: Wed, 31 Jan 2024 20:12:36 +0800 Subject: [PATCH] improve CI --- .github/workflows/rust.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3deba89..cf583ba 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,27 +2,34 @@ name: Rust on: push: - branches: [ "master" ] + branches: + - '*' pull_request: - branches: [ "master" ] + branches: + - '*' env: CARGO_TERM_COLOR: always jobs: build: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + rust: [stable, beta, nightly] steps: - uses: actions/checkout@v3 - name: Check fmt run: cargo fmt --all -- --check + - name: Doc tests + run: cargo test --doc - name: Clippy run: cargo clippy --all --all-features -- --deny warnings - name: Build run: cargo build --verbose - - name: Doc tests - run: cargo test --doc - name: Run tests run: cargo test --verbose + - name: Run tests + run: cargo test --verbose --all --all-features