Files
qitech-control/.github/workflows/rust.yml
T
2025-04-08 13:53:25 +02:00

40 lines
865 B
YAML

name: Rust
on:
push:
branches:
- "**"
pull_request:
branches: "*"
env:
CARGO_TERM_COLOR: always
RUST_VERSION: "1.86"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Rust version
run: rustup override set ${{ env.RUST_VERSION }}
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ env.RUST_VERSION }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.RUST_VERSION }}-cargo-
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose