Add CI tests
A cached setup that includes cargo check, clippy, fmt, and test Signed-off-by: Evan Lloyd New-Schmidt <evan@new-schmidt.com>
This commit is contained in:
parent
5991270650
commit
c38870a3a0
1 changed files with 33 additions and 0 deletions
33
.github/workflows/ci.yml
vendored
Normal file
33
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Continuous Integration
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
name: cargo check/clippy/fmt/test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: rustup toolchain install stable --profile minimal
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
# bump this to invalidate build/dependency cache
|
||||
prefix-key: "v0-rust"
|
||||
|
||||
- name: Check compilation
|
||||
run: cargo check --verbose --locked
|
||||
- name: Lint
|
||||
run: cargo clippy
|
||||
- name: Test
|
||||
run: cargo test --verbose --locked
|
||||
- name: Formatting
|
||||
run: cargo fmt --verbose --check
|
Loading…
Add table
Reference in a new issue