add GH workflow for rust
This commit is contained in:
parent
f3bc2f4f08
commit
f225b4cd5b
1 changed files with 37 additions and 0 deletions
37
.github/workflows/rust.yml
vendored
Normal file
37
.github/workflows/rust.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
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@v4
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
target
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
|
- name: Rust version
|
||||||
|
run: rustup --version
|
||||||
|
- name: Check
|
||||||
|
run: cargo check --verbose
|
||||||
|
- name: Clippy
|
||||||
|
run: cargo cippy
|
||||||
|
- name: Build
|
||||||
|
run: cargo build --verbose
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --verbose
|
Loading…
Add table
Reference in a new issue