Skip to content

removed unused function #1326

removed unused function

removed unused function #1326

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
container:
image: ghcr.io/hotosm/fmtm/backend:ci
env:
FMTM_DB_URL: postgresql+psycopg2://fmtm:fmtm@fmtm-db:5432/fmtm
ODK_CENTRAL_URL: http://localhost:8383
ODK_CENTRAL_USER: odk
ODK_CENTRAL_PASSWD: odk
OSM_CLIENT_ID: test
OSM_CLIENT_SECRET: test
OSM_URL: https://www.openstreetmap.org
OSM_SCOPE: read_prefs
OSM_LOGIN_REDIRECT_URI: http://127.0.0.1:8000/auth/callback/
OSM_SECRET_KEY: test
URL_SCHEME: "http"
FRONTEND_MAIN_URL: "localhost:8080"
FRONTEND_MAP_URL: "localhost:8081"
options: --user root
# pytest needs a database
services:
# Label used to access the postgres service container
fmtm-db:
# Uses dockerhub postgis image
image: postgis/postgis:14-3.3-alpine
# Provide the password, initilized database for pytest user
env:
POSTGRES_PASSWORD: fmtm
POSTGRES_DB: fmtm
POSTGRES_USER: fmtm
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Run pytest as appuser
run: |
cd src/backend
gosu appuser pytest