Skip to content

Feat update schemas #1627

Feat update schemas

Feat update schemas #1627

Workflow file for this run

name: pytest
on:
# Run tests on all pushed branches
push:
branches:
- "*"
# Run tests on PR, prior to merge to main & development.
pull_request:
branches:
- main
- staging
- development
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
environment:
name: test
container:
image: ghcr.io/hotosm/fmtm/backend:ci-${{ github.base_ref || github.ref_name }}
env:
ODK_CENTRAL_URL: ${{ vars.ODK_CENTRAL_URL }}
ODK_CENTRAL_USER: ${{ vars.ODK_CENTRAL_USER }}
ODK_CENTRAL_PASSWD: ${{ vars.ODK_CENTRAL_PASSWD }}
OSM_CLIENT_ID: ${{ vars.OSM_CLIENT_ID }}
OSM_CLIENT_SECRET: ${{ vars.OSM_CLIENT_SECRET }}
OSM_SECRET_KEY: ${{ vars.OSM_SECRET_KEY }}
FRONTEND_MAIN_URL: ${{ vars.FRONTEND_MAIN_URL }}
FRONTEND_MAP_URL: ${{ vars.FRONTEND_MAP_URL }}
options: --user root
services:
# Start backend database
fmtm-db:
image: postgis/postgis:14-3.3-alpine
env:
POSTGRES_PASSWORD: fmtm
POSTGRES_DB: fmtm
POSTGRES_USER: fmtm
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# Start ODK Central database
central-db:
image: "postgis/postgis:14-3.3-alpine"
env:
POSTGRES_PASSWORD: odk
POSTGRES_DB: odk
POSTGRES_USER: odk
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
# Start ODK Central
central:
image: "ghcr.io/hotosm/fmtm/odkcentral:v2023.2.1"
env:
DOMAIN: local
SYSADMIN_EMAIL: [email protected]
SYSADMIN_PASSWD: odk
HTTPS_PORT: 443
DB_HOST: central-db
DB_USER: odk
DB_PASSWORD: odk
DB_NAME: odk
SENTRY_ORG_SUBDOMAIN: o130137
SENTRY_KEY: 3cf75f54983e473da6bd07daddf0d2ee
SENTRY_PROJECT: 1298632
# Start proxy to access ODK Central
central-proxy:
image: "ghcr.io/hotosm/fmtm/odkcentral-proxy:latest"
steps:
- uses: actions/checkout@v3
- name: Run pytest as appuser
run: |
cd src/backend
gosu appuser pytest