A four-axis audit found no HIGH/MEDIUM issues. This addresses the remaining low-risk items and protects the release path: - ci: add cargo test + clippy -D warnings gate on master/tags - ci: reject malformed version tags before the pkgver sed substitution - fix: move the shipped waybar wrapper's cache/lock to $XDG_RUNTIME_DIR (mode-700, no cross-user symlink) instead of predictable /tmp paths - refactor: find_card() returns the open ALSA mixer, dropping a second open; collapse two if-let blocks into edition-2024 let-chains - docs: record in DECISIONS.md why the audit's "dead code" stays (it mirrors the Bragi spec) and why the 5ms HID sleep is left as-is Bump 0.1.4 -> 0.1.5: the shipped waybar script changes behavior.
32 lines
650 B
YAML
32 lines
650 B
YAML
# ABOUTME: Test + lint gate on push to master and on version tags.
|
|
# ABOUTME: Stops a broken build or regressed test from reaching a tagged release.
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: moonarch
|
|
steps:
|
|
- name: Checkout pushed commit
|
|
run: |
|
|
git clone http://gitea:3000/nevaforget/corsairctl.git repo
|
|
cd repo
|
|
git checkout "$GITHUB_SHA"
|
|
|
|
- name: cargo test
|
|
run: |
|
|
cd repo
|
|
cargo test --locked
|
|
|
|
- name: cargo clippy
|
|
run: |
|
|
cd repo
|
|
cargo clippy --all-targets -- -D warnings
|