ci: create rust.yml

This commit is contained in:
Yujia Qiao 2021-12-19 15:35:43 +08:00 committed by Yujia Qiao
parent 64c2c632e7
commit d813692e6f
No known key found for this signature in database
GPG Key ID: DC129173B148701B
1 changed files with 30 additions and 0 deletions

30
.github/workflows/rust.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v1
- name: Clippy
run: cargo clippy
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose