name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
pull-requests: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubicloud-standard-2
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
add-job-id-key: "false"
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
clippy_check:
runs-on: ubicloud-standard-2
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: "true"
add-job-id-key: "false"
- name: Clippy (deny warnings)
run: cargo clippy --all-targets --all-features -- -D warnings