Add CI workflow for linting and tests

This commit is contained in:
Martin Frost 2021-08-18 22:35:02 +02:00
parent e60fae7031
commit 79b73ee75c
1 changed files with 23 additions and 0 deletions

23
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,23 @@
on: push
name: CI
jobs:
lint_and_test:
name: lint and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy, rustfmt
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -D warnings
- run: cargo check --workspace --all-features
- run: cargo test --all-targets
- run: cargo fmt --all -- --check