Files
nuchat/.gitea/workflows/cargo.yaml
Fergus Molloy 032d043c3e
All checks were successful
Cargo / check (push) Successful in 1m50s
Cargo / test (push) Successful in 3m3s
Cargo / build (push) Successful in 1m31s
go to old cache
2025-07-18 13:35:24 +01:00

58 lines
1.5 KiB
YAML

name: Cargo
run-name: ${{ gitea.actor }} is verifying cargo build and tests
on: [push]
jobs:
build:
env:
RUNNER_TOOL_CACHE: /toolcache
runs-on: rust-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Cargo target cache
uses: actions/cache@v4
with:
path: |
~/.cargo
target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo-target
- name: Build project
uses: actions-rs/cargo@v1
with:
command: build
args: --release
check:
runs-on: rust-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -Dwarnings -Wclippy::correctness -Wclippy::complexity -Wclippy::perf -Aclippy::missing_errors_doc -Aclippy::missing_panics_doc
test:
runs-on: rust-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: --lib --bins
- name: Run integration tests
uses: actions-rs/cargo@v1
with:
command: test
args: --tests '*'