Add github actions for checking code
This commit is contained in:
parent
fbc7c22f3d
commit
8009fefee1
|
@ -0,0 +1,29 @@
|
|||
name: Build and check
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
- name: Build
|
||||
run: cargo check --verbose --release
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- name: Check formatting
|
||||
run: cargo fmt -- --check
|
Loading…
Reference in New Issue