Skip to content

move drop_forein_tables func in public schema #97

move drop_forein_tables func in public schema

move drop_forein_tables func in public schema #97

Workflow file for this run

name: Run Pytest
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:15-3.4
ports:
- 5432:5432
env:
POSTGRES_USER: geonatadmin
POSTGRES_PASSWORD: monpassachanger
POSTGRES_DB: geonatureatlas_test
options: >-
--health-cmd="pg_isready -U atlas -d atlas_test"
--health-interval=10s
--health-timeout=5s
--health-retries=5
env:
# Variable d'environnement pour ton app Flask
ATLAS_SETTINGS: ${{ github.workspace }}/atlas/tests/test_config.py
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e ".[dev]"
- name: Create app structure
run: |
cp -r atlas/static/sample/* atlas/static/custom
- name: Wait for PostgreSQL to be ready
run: |
for i in {1..10}; do
pg_isready -h localhost -p 5432 -U atlas && break
echo "Postgres not ready yet..."
sleep 2
done
- name: Run pytest
run: |
pytest -vv --cov --cov-branch --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: pytest