From f75385425524014da31b361affb95536fa44f002 Mon Sep 17 00:00:00 2001 From: Simon Johnston Date: Wed, 28 Oct 2020 10:36:38 -0700 Subject: [PATCH] Update rust.yml --- .github/workflows/rust.yml | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 17fb6c3..530f728 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,24 +1,29 @@ name: Rust -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always +on: [push] jobs: build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Build docs - run: cargo doc --verbose --no-deps - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v1 + + - name: Install dependencies + run: rustup component add rustfmt + + - name: Format + run: cargo fmt -- --check + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --all-features --verbose + + - name: Docs + run: cargo doc --no-deps