Skip to content

fix(risk): lower low and very_low FWI confidence thresholds #1295

fix(risk): lower low and very_low FWI confidence thresholds

fix(risk): lower low and very_low FWI confidence thresholds #1295

Workflow file for this run

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@v7
- uses: actions/setup-python@v7
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
- name: Run Telegram end-to-end check
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_TEST_CHAT_ID: ${{ secrets.TELEGRAM_TEST_CHAT_ID }}
run: |
if [ -n "$TELEGRAM_TOKEN" ] && [ -n "$TELEGRAM_TEST_CHAT_ID" ]; then
docker compose -f docker-compose.dev.yml exec -T -e TELEGRAM_TOKEN -e TELEGRAM_TEST_CHAT_ID backend pytest tests/services/test_telegram.py -v
else
echo "TELEGRAM_TOKEN / TELEGRAM_TEST_CHAT_ID secrets not set, skipping"
fi
- name: Stop the stack
if: always()
run: docker compose -f docker-compose.dev.yml down
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7
with:
files: ./coverage-src.xml
flags: backend
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
pytest-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
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
flags: client
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
headers:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v7
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/"