37 lines
647 B
YAML
37 lines
647 B
YAML
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
|
|
- name: Clippy
|
|
run: cargo clippy
|
|
- name: Build
|
|
run: cargo build
|
|
- name: Run tests
|
|
run: cargo test
|