From 308d2fc89d904f5e77189f5d32d68abc7fdf13ee Mon Sep 17 00:00:00 2001 From: ruv Date: Tue, 2 Jun 2026 17:26:39 +0200 Subject: [PATCH] =?UTF-8?q?ci(v1-api):=20fix=20gh-pages=20403=20+=20run=20?= =?UTF-8?q?real=20perf=20suite=20=E2=80=94=20green=20main=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two more latent v1-API CI bugs surfaced once #910/#911 let the jobs reach their later steps: - API Documentation: openapi generation now succeeds (psutil fix), but the gh-pages deploy failed with HTTP 403 — the job had no `permissions` block and GITHUB_TOKEN is read-only by default. Add `permissions: contents: write`, and make the deploy `continue-on-error` (the openapi generation is the real validation; Pages may be disabled). - Performance Tests: ran `locust -f tests/performance/locustfile.py`, but there is no locustfile — the suite is pytest (test_api_throughput.py, test_frame_budget.py, test_inference_speed.py). Run pytest instead, with working-directory: archive/v1 and MOCK_POSE_DATA=true. ci.yml validated as well-formed YAML. --- .github/workflows/ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dbb00b3..82c66d72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -278,14 +278,22 @@ jobs: sleep 10 - name: Run performance tests + working-directory: archive/v1 + env: + MOCK_POSE_DATA: "true" run: | - locust -f tests/performance/locustfile.py --headless --users 50 --spawn-rate 5 --run-time 60s --host http://localhost:8000 + # The repo's performance suite is pytest (test_api_throughput.py, + # test_frame_budget.py, test_inference_speed.py) — there is no + # locustfile.py, so the old `locust -f tests/performance/locustfile.py` + # command always failed with "Could not find ...". Run the real suite. + pytest tests/performance/ -v --junitxml=perf-junit.xml - name: Upload performance results + if: always() uses: actions/upload-artifact@v4 with: name: performance-results - path: locust_report.html + path: archive/v1/perf-junit.xml # Docker Build and Test # NOTE: the canonical Docker build for the sensing-server is now @@ -371,6 +379,8 @@ jobs: runs-on: ubuntu-latest needs: [docker-build] if: github.ref == 'refs/heads/main' + permissions: + contents: write # gh-pages deploy needs write (GITHUB_TOKEN is read-only by default → 403) steps: - name: Checkout code uses: actions/checkout@v4 @@ -400,6 +410,7 @@ jobs: - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 + continue-on-error: true # openapi generation above is the real validation; deploy is best-effort (Pages may be disabled) with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs