Refactored partners stats to be non blocking operation, handle csrf auth and update the graphql query as per mapswipe update #101
Workflow file for this run
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: 🧪 PR Test Backend | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - staging | |
| - develop | |
| paths: | |
| - "backend/**" | |
| workflow_dispatch: | |
| jobs: | |
| code-check-PEP8: | |
| name: Run PEP8 code style checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 | |
| pip install black==25.1.0 | |
| - name: Run PEP8 checks | |
| run: | | |
| flake8 manage.py backend tests migrations --ignore=E203,W503,F401,E501 | |
| black --check manage.py backend tests migrations | |
| pytest: | |
| uses: hotosm/gh-workflows/.github/workflows/test_compose.yml@3.2.0 | |
| with: | |
| image_name: ghcr.io/${{ github.repository }}/backend | |
| build_context: . | |
| build_dockerfile: ./scripts/docker/Dockerfile | |
| pre_command: | | |
| cp example.env tasking-manager.env | |
| docker compose up -d tm-db tm-backend tm-migration tm-cron-jobs traefik | |
| docker compose exec tm-db bash -c "PGPASSWORD=tm psql -U tm -d tasking-manager <<EOF | |
| CREATE DATABASE taskingmanagertest; | |
| EOF" | |
| compose_file: "docker-compose.yml" | |
| compose_service: tm-backend | |
| compose_command: pytest tests/api/unit/ -p no:warnings | |
| cache_extra_imgs: | | |
| "postgis/postgis:14-3.3" | |
| secrets: inherit |