Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: postgres

Check warning on line 168 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Infrastructure Security Scan

[HIGH] Passwords And Secrets - Generic Password

Query to find passwords and secrets in infrastructure code.
POSTGRES_DB: test_wifi_densepose
options: >-
--health-cmd pg_isready
Expand Down Expand Up @@ -207,7 +207,7 @@
- name: Run unit tests
continue-on-error: true
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_wifi_densepose

Check warning on line 210 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Infrastructure Security Scan

[HIGH] Passwords And Secrets - Password in URL

Query to find passwords and secrets in infrastructure code.
REDIS_URL: redis://localhost:6379/0
ENVIRONMENT: test
run: |
Expand All @@ -216,7 +216,7 @@
- name: Run integration tests
continue-on-error: true
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/test_wifi_densepose

Check warning on line 219 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / Infrastructure Security Scan

[HIGH] Passwords And Secrets - Password in URL

Query to find passwords and secrets in infrastructure code.
REDIS_URL: redis://localhost:6379/0
ENVIRONMENT: test
run: |
Expand Down Expand Up @@ -265,7 +265,7 @@
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install locust
pip install pytest # the perf suite is pytest, not locust

- name: Start application
working-directory: archive/v1
Expand All @@ -278,14 +278,24 @@
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.
# -o addopts="" drops the root pyproject's --cov/--cov-fail-under=100
# flags (pytest-cov isn't installed here and 100% cov is for unit tests).
pytest tests/performance/ -o addopts="" -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
Expand Down Expand Up @@ -371,6 +381,8 @@
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
Expand Down Expand Up @@ -400,6 +412,7 @@

- 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
Expand Down
Loading