ci: test every module, document the platform/ layout

This commit is contained in:
hoelee committed 2026-11-17 16:04:00 +08:00
1 parent 7d04a8358a
commit ffdff393e4
2 files changed
+55

No files matched your search

+53
View File
@@ -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
+2
View File
@@ -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.