feat(cameras): add a route to update the last known image of a camera #396
Workflow file for this run
This file contains 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 | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: "1.8.2" | |
- name: Resolve dependencies | |
run: poetry export -f requirements.txt --without-hashes --with test --output requirements.txt | |
- name: Run the backend & the test | |
env: | |
SUPERUSER_LOGIN: dummy_login | |
SUPERUSER_PWD: dummy&P@ssw0rd! | |
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 | |
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: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage-src.xml | |
flags: backend | |
fail_ci_if_error: true | |
pytest-client: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python: [3.9] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: x64 | |
- uses: abatilo/actions-poetry@v3 | |
with: | |
poetry-version: "1.8.2" | |
- name: Resolve dependencies | |
run: | | |
poetry export -f requirements.txt --without-hashes --output requirements.txt | |
python -m pip install --upgrade uv | |
uv pip install --system -e "client/.[test]" | |
- name: Run the backend & the test | |
env: | |
SUPERUSER_LOGIN: dummy_login | |
SUPERUSER_PWD: dummy&P@ssw0rd! | |
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 | |
cd client && pytest --cov=pyroclient --cov-report xml tests/ | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./client/coverage.xml | |
flags: client | |
fail_ci_if_error: true | |
headers: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
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' | |
ignore-folders: 'client/tests/,src/tests/,src/migrations/versions/' |