1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 06:45:32 +00:00

refactor: Centralize test flags and commands in Makefile

- Add TEST_FLAGS variable for single-threaded test execution
- Create verbose targets for CI usage
- Update pre-commit hooks to use make targets
- Update CI workflow to use make targets
- This ensures consistency between local and CI test execution

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jason Hall 2025-06-08 12:02:29 -04:00
parent c5b7bc1236
commit e15bd1df8c
Failed to extract signature
3 changed files with 33 additions and 24 deletions

View file

@ -44,17 +44,7 @@ jobs:
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Setup cargo config for cross-compilation
run: |
mkdir -p .cargo
cat > .cargo/config.toml << 'EOF'
[target.x86_64-unknown-linux-musl]
linker = "x86_64-linux-musl-gcc"
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-gnu-gcc"
EOF
- name: Verify cross-compilation setup (Unix)
- name: Verify cross-compilation setup
run: |
echo "Installed targets:"
rustup target list --installed
@ -71,11 +61,11 @@ jobs:
echo "Cargo config:"
cat .cargo/config.toml || echo "No cargo config found"
- name: Build
run: cargo build --verbose
run: make build-verbose
- name: Run unit tests
run: cargo test --verbose -- --test-threads=1
run: make test-verbose
- name: Run e2e tests
run: cargo test --test '*' --verbose -- --test-threads=1
run: make test-e2e-verbose
fmt:
name: Rustfmt
@ -88,7 +78,7 @@ jobs:
toolchain: stable
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
run: make check-fmt
clippy:
name: Clippy
@ -101,7 +91,7 @@ jobs:
toolchain: stable
components: clippy
- name: Run clippy
run: cargo clippy -- -D warnings
run: make lint
security-audit:
name: Security Audit