name: Build & Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
name: Ubuntu Latest
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Select Rust toolchain
run: |
rustup default nightly
rustup component add clippy rustfmt
- name: Build
run: cargo check --verbose
- name: Test
run: cargo test --verbose -- --nocapture
- name: Lint
run: cargo clippy --verbose -- -D warnings
- name: Formatting
run: cargo fmt -- --check