mirror of
https://github.com/telemt/telemt.git
synced 2026-06-19 02:00:08 +07:00
e6b77af931
Co-Authored-By: brekotis <93345790+brekotis@users.noreply.github.com>
56 lines
1.2 KiB
YAML
56 lines
1.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ "*" ]
|
|
pull_request:
|
|
branches: [ "*" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test / Lint / Analysis
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: write
|
|
checks: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install latest stable Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache cargo registry & build artifacts
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-
|
|
|
|
- name: Run tests
|
|
run: cargo test --verbose
|
|
|
|
# clippy не валит билд (осознанно)
|
|
- name: Run clippy
|
|
run: cargo clippy -- --cap-lints warn
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Install cargo-udeps
|
|
run: cargo install cargo-udeps || true
|
|
|
|
- name: Check for unused dependencies
|
|
run: cargo udeps || true |