From a746fc0216b09a64c5dedb02cc8693edf61d04bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Mon, 16 Dec 2019 19:00:54 -0800 Subject: [PATCH] meta(ci): improve CI workflow --- .github/workflows/rust.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0370a5b..3bd1cb2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,12 +2,33 @@ name: Rust on: [push, pull_request] +env: + RUSTFLAGS: -Dwarnings + jobs: - build: + fmt_and_docs: + name: Check fmt & build docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt + override: true + - name: rustfmt + run: cargo fmt --all -- --check + - name: docs + run: cargo doc + + build_and_test: + name: Build & Test runs-on: ${{ matrix.os }} strategy: matrix: - rust: [stable, beta, nightly] + rust: [1.39.0, stable] os: [ubuntu-latest, macOS-latest, windows-latest] steps: @@ -17,12 +38,10 @@ jobs: with: profile: minimal toolchain: ${{ matrix.rust }} - components: rustfmt, clippy + components: clippy override: true - name: Check run: cargo check - - name: Rustfmt - run: cargo fmt --all -- --check - name: Clippy run: cargo clippy -- -D warnings - name: Run tests