From f3bd2bb22e95270d7433f796b614577ae7b0b085 Mon Sep 17 00:00:00 2001 From: hoelee Date: Tue, 17 Nov 2026 23:18:23 +0800 Subject: [PATCH] ci: test every module, document the platform/ layout --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 55 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..9c140876 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + +jobs: + go: + name: middleware (go) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.21' + - run: go vet ./... + - run: go test ./... + + python: + name: py-monitor (python) + runs-on: ubuntu-latest + defaults: + run: + working-directory: platform/py-monitor + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - run: python -m unittest discover -s tests -v + + java: + name: java-cache (maven) + runs-on: ubuntu-latest + defaults: + run: + working-directory: platform/java-cache + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + cache: maven + - run: mvn -B -q test + + shell: + name: shell-sync (syntax) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: bash -n platform/shell-sync/sync.sh diff --git a/README.md b/README.md index 638d0904..282b268c 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ `traefik-botfilter` is a dependency-free Traefik middleware plugin that rejects common scanner requests and temporarily bans suspicious clients with bounded, in-memory per-IP scoring. It is a lightweight first layer of protection, not a replacement for a WAF. +The `platform/` directory also holds three standalone pieces extracted from other projects in the same self-hosted stack - a Spring Boot cache and security configuration, a stdlib-only Python scraper toolkit, and an OAuth2 IMAP sync entrypoint. Each one builds and tests on its own; see [`platform/README.md`](platform/README.md). + ## Features - Blocks configured paths, extensions, and User-Agent substrings before the request reaches the backend.