fix(detections): map each crop to its own bbox (#616) #1114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: tests | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| branches: main | |
| env: | |
| PYTHON_VERSION: "3.11" | |
| UV_VERSION: "0.11.14" | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Run backend tests | |
| env: | |
| SUPERADMIN_LOGIN: dummy_login | |
| SUPERADMIN_PWD: dummy&P@ssw0rd! | |
| SUPERADMIN_ORG: dummyorga | |
| POSTGRES_USER: dummy_pg_user | |
| POSTGRES_PASSWORD: dummy_pg_pwd | |
| POSTGRES_DB: dummy_pg_db | |
| run: | | |
| UV_GROUPS="server test" docker compose -f docker-compose.dev.yml up -d --build --wait | |
| docker compose -f docker-compose.dev.yml exec -T backend pytest --cov=app --cov-report xml tests/ | |
| docker compose -f docker-compose.dev.yml cp backend:/app/coverage.xml ./coverage-src.xml | |
| docker compose -f docker-compose.dev.yml down | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./coverage-src.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| pytest-client: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| architecture: x64 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Run client tests | |
| env: | |
| SUPERADMIN_LOGIN: dummy_login | |
| SUPERADMIN_PWD: dummy&P@ssw0rd! | |
| SUPERADMIN_ORG: dummyorga | |
| POSTGRES_USER: dummy_pg_user | |
| POSTGRES_PASSWORD: dummy_pg_pwd | |
| POSTGRES_DB: dummy_pg_db | |
| run: | | |
| docker compose -f docker-compose.dev.yml up -d --build --wait | |
| SUPERADMIN_LOGIN=superadmin_login SUPERADMIN_PWD=superadmin_pwd uv run --group client-test pytest --cov=pyroclient --cov-report xml client/tests/ | |
| docker compose -f docker-compose.dev.yml down | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: ./coverage.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| headers: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Check the headers | |
| uses: frgfm/validate-python-headers@main | |
| with: | |
| license: "Apache-2.0" | |
| owner: "Pyronear" | |
| starting-year: 2020 | |
| folders: "src,client,.github" | |
| ignore-files: "version.py,__init__.py,verify_deps_sync.py" | |
| ignore-folders: "client/tests/,src/tests/,src/migrations/versions/" |