meta(ci): improve CI workflow

This commit is contained in:
Kat Marchán 2019-12-16 19:00:54 -08:00
parent 513d55833d
commit a746fc0216
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
1 changed files with 24 additions and 5 deletions

View File

@ -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