better CI
This commit is contained in:
parent
5baca51f1d
commit
2e0eec6830
49
.github/workflows/rust.yml
vendored
49
.github/workflows/rust.yml
vendored
@ -1,22 +1,41 @@
|
||||
name: Rust
|
||||
name: Check on every push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build_ubuntu:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
default: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Formatter
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
- name: Clippy
|
||||
uses: actions-rs/clippy-check@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
args: --all --all-features
|
||||
|
||||
- name: Test
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: test
|
||||
args: --all --verbose
|
||||
|
||||
# This is used to ensure that Cargo.lock is up to date
|
||||
- name: Check for unstaged files
|
||||
run: git diff --exit-code
|
||||
|
Loading…
Reference in New Issue
Block a user