ci: add clang-format, ktlint, and cargo test to lint job

- Rename lint-rust → lint, add clang-format and ktlint checks
- Add cargo test step for zygisk unit tests
- Install clang-format and ktlint 1.8.0 in CI Docker image
This commit is contained in:
okhsunrog 2026-04-12 23:29:36 +03:00
parent e2d41dea13
commit b4677cdb25
2 changed files with 20 additions and 1 deletions

View file

@ -19,9 +19,16 @@ RUN apt-get update && \
openjdk-17-jdk-headless \
bc kmod cpio flex bison libssl-dev libelf-dev \
binutils-aarch64-linux-gnu \
clang-format \
git && \
rm -rf /var/lib/apt/lists/*
# ── ktlint (for lsposed / test-app Kotlin) ──────────────────────────
ENV KTLINT_VERSION=1.8.0
RUN curl -fsSL -o /usr/local/bin/ktlint \
"https://github.com/pinterest/ktlint/releases/download/${KTLINT_VERSION}/ktlint" && \
chmod +x /usr/local/bin/ktlint
# ── Rust toolchain (for zygisk) ──────────────────────────────────────
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \

View file

@ -12,7 +12,7 @@ permissions:
packages: read
jobs:
lint-rust:
lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}/ci:latest
@ -25,6 +25,8 @@ jobs:
submodules: recursive
- name: Mark workspace safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
# Rust
- name: rustfmt
run: |
cd zygisk && cargo fmt --check
@ -33,6 +35,16 @@ jobs:
run: cd zygisk && cargo ndk -t arm64-v8a clippy -- -D warnings
- name: clippy (test-app)
run: cd test-app/native && cargo ndk -t arm64-v8a clippy -- -D warnings
- name: cargo test (zygisk)
run: cd zygisk && cargo test
# C (kernel module)
- name: clang-format
run: clang-format --dry-run --Werror kmod/vpnhide_kmod.c
# Kotlin
- name: ktlint
run: ktlint "lsposed/**/*.kt" "test-app/**/*.kt"
kmod:
runs-on: ubuntu-latest