mirror of https://github.com/zkat/cacache-rs.git
meta(ci): improve CI workflow
This commit is contained in:
parent
513d55833d
commit
a746fc0216
|
|
@ -2,12 +2,33 @@ name: Rust
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: -Dwarnings
|
||||||
|
|
||||||
jobs:
|
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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust: [stable, beta, nightly]
|
rust: [1.39.0, stable]
|
||||||
os: [ubuntu-latest, macOS-latest, windows-latest]
|
os: [ubuntu-latest, macOS-latest, windows-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -17,12 +38,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
components: rustfmt, clippy
|
components: clippy
|
||||||
override: true
|
override: true
|
||||||
- name: Check
|
- name: Check
|
||||||
run: cargo check
|
run: cargo check
|
||||||
- name: Rustfmt
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy -- -D warnings
|
run: cargo clippy -- -D warnings
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue