|
| 1 | +--- |
| 2 | +name: 'PII NER tier E2E (live GGUF, CPU)' |
| 3 | + |
| 4 | +# Runs the real privacy-filter GGUF NER tier end-to-end on CPU — the gap the |
| 5 | +# hermetic tests/e2e suite cannot cover (it only exercises the in-process |
| 6 | +# pattern tier). Heavy (builds the C++ backend image + downloads a ~2.7 GB |
| 7 | +# GGUF), so it is path-filtered on PRs and otherwise runs nightly / on demand. |
| 8 | +# |
| 9 | +# This drives the container-level harness (tests/e2e-backends) via |
| 10 | +# `make test-extra-backend-privacy-filter`: it builds the privacy-filter image, |
| 11 | +# downloads the model, loads it on CPU, and asserts byte-correct, UTF-8-aligned |
| 12 | +# TokenClassify spans. The complementary HTTP-path specs in tests/e2e |
| 13 | +# (e2e_pii_ner_test.go) Skip unless PII_NER_MODEL_GGUF is wired. |
| 14 | + |
| 15 | +on: |
| 16 | + workflow_dispatch: |
| 17 | + schedule: |
| 18 | + - cron: '0 3 * * *' |
| 19 | + push: |
| 20 | + branches: |
| 21 | + - master |
| 22 | + paths: |
| 23 | + - 'backend/cpp/privacy-filter/**' |
| 24 | + - 'backend/Dockerfile.privacy-filter' |
| 25 | + - 'core/services/routing/pii/**' |
| 26 | + - 'core/services/routing/piidetector/**' |
| 27 | + - 'core/backend/token_classify.go' |
| 28 | + - 'core/http/endpoints/localai/pii.go' |
| 29 | + - 'core/schema/pii.go' |
| 30 | + - 'tests/e2e-backends/**' |
| 31 | + - 'tests/e2e/e2e_pii_ner_test.go' |
| 32 | + - 'tests/e2e/e2e_suite_test.go' |
| 33 | + - '.github/workflows/tests-pii-ner-e2e.yml' |
| 34 | + pull_request: |
| 35 | + paths: |
| 36 | + - 'backend/cpp/privacy-filter/**' |
| 37 | + - 'backend/Dockerfile.privacy-filter' |
| 38 | + - 'core/services/routing/pii/**' |
| 39 | + - 'core/services/routing/piidetector/**' |
| 40 | + - 'core/backend/token_classify.go' |
| 41 | + - 'core/http/endpoints/localai/pii.go' |
| 42 | + - 'core/schema/pii.go' |
| 43 | + - 'tests/e2e-backends/**' |
| 44 | + - 'tests/e2e/e2e_pii_ner_test.go' |
| 45 | + - 'tests/e2e/e2e_suite_test.go' |
| 46 | + - '.github/workflows/tests-pii-ner-e2e.yml' |
| 47 | + |
| 48 | +concurrency: |
| 49 | + group: ci-tests-pii-ner-e2e-${{ github.event.pull_request.number || github.sha }}-${{ github.repository }} |
| 50 | + cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 51 | + |
| 52 | +jobs: |
| 53 | + tests-pii-ner-e2e: |
| 54 | + runs-on: ubuntu-latest |
| 55 | + strategy: |
| 56 | + matrix: |
| 57 | + go-version: ['1.25.x'] |
| 58 | + steps: |
| 59 | + - name: Clone |
| 60 | + uses: actions/checkout@v6 |
| 61 | + with: |
| 62 | + submodules: true |
| 63 | + - name: Free disk space |
| 64 | + run: | |
| 65 | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true |
| 66 | + sudo docker image prune --all --force || true |
| 67 | + df -h |
| 68 | + - name: Configure apt mirror on runner |
| 69 | + uses: ./.github/actions/configure-apt-mirror |
| 70 | + - name: Setup Go ${{ matrix.go-version }} |
| 71 | + uses: actions/setup-go@v5 |
| 72 | + with: |
| 73 | + go-version: ${{ matrix.go-version }} |
| 74 | + cache: false |
| 75 | + - name: Proto Dependencies |
| 76 | + run: | |
| 77 | + curl -L -s https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip -o protoc.zip && \ |
| 78 | + unzip -j -d /usr/local/bin protoc.zip bin/protoc && \ |
| 79 | + rm protoc.zip |
| 80 | + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 |
| 81 | + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@1958fcbe2ca8bd93af633f11e97d44e567e945af |
| 82 | + PATH="$PATH:$HOME/go/bin" make protogen-go |
| 83 | + - name: Dependencies |
| 84 | + run: | |
| 85 | + sudo apt-get update |
| 86 | + sudo apt-get install -y build-essential |
| 87 | + # Builds local-ai-backend:privacy-filter, downloads the GGUF, loads it on |
| 88 | + # CPU and runs the token_classify capability spec (byte-offset contract). |
| 89 | + - name: Run live PII NER backend E2E |
| 90 | + run: PATH="$PATH:$HOME/go/bin" make test-extra-backend-privacy-filter |
| 91 | + - name: Setup tmate session if tests fail |
| 92 | + if: ${{ failure() }} |
| 93 | + uses: mxschmitt/action-tmate@v3.23 |
| 94 | + with: |
| 95 | + detached: true |
| 96 | + connect-timeout-seconds: 180 |
| 97 | + limit-access-to-actor: true |
0 commit comments