Add User-Agent header for OSM stats request #187
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-unit: | |
| 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 .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 | |
| example_env_file_path: example.env | |
| environment: develop | |
| cache_extra_imgs: | | |
| "postgis/postgis:14-3.3" | |
| secrets: inherit | |
| pytest-integration: | |
| 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 .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/integration/ -p no:warnings | |
| example_env_file_path: example.env | |
| environment: develop | |
| cache_extra_imgs: | | |
| "postgis/postgis:14-3.3" | |
| secrets: inherit |