Skip to content

refactor(main): decompose CLI, path, and systemd helpers #38

refactor(main): decompose CLI, path, and systemd helpers

refactor(main): decompose CLI, path, and systemd helpers #38

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo directories
uses: Swatinem/rust-cache@v2
with:
shared-key: ubuntu-stable
save-if: ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Verify dev manifest version
run: |
expected_version="0.0.0"
actual_version="$(sed -nE 's/^version = "([^"]+)"/\1/p' Cargo.toml)"
if [ "$actual_version" != "$expected_version" ]; then
echo "Cargo.toml version must stay at $expected_version on branches; found $actual_version" >&2
echo "Use a vX.Y.Z git tag to define release version in release workflow." >&2
exit 1
fi
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --locked --all-targets -- -D warnings
- name: Build
run: cargo build --locked --verbose
- name: Run tests
run: cargo test --locked --verbose