Skip to content

Refactored Config management #829

Refactored Config management

Refactored Config management #829

Workflow file for this run

# e2e-tests for Metacatalog
name: e2e Test
on:
pull_request:
types: [opened, reopened, synchronize, edited]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
py_version: ['3.7', '3.8', '3.9', '3.10']
pg_version: ['13-3.3', '15-3.3']
# create the postgis service - the version is hardcoded atm
services:
postgis:
image: postgis/postgis:${{ matrix.pg_version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Chechout Repository
uses: actions/checkout@v3
- name: Install Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.py_version }}
# install metacatalog and test dependencies
# e2e-tests rely on pytest and pytest-depends so far
- name: Install dependencies
run: |
pip install -e .
pip install pytest pytest-depends pytest-cov
# run the actual tests
# they need the arbitrary port number which is mapped to 5432
# in the VM host
# this has a lot of side-effects, as e2e is run against an
# actual database
- name: e2e Tests
run: pytest --cov-config=.coveragerc --cov=./ --cov-report=xml
env:
METACATALOG_URI: postgresql://postgres:postgres@postgis:5432/postgres
POSTGRES_PORT: ${{ job.services.postgis.ports[5432] }}
- name: Upload coverage to Codecov
if: ${{ matrix.py_version }} == '3.9' && ${{ matrix.pg_version == '15.3-3' }}
uses: codecov/[email protected]
with:
file: ./coverage.xml
flags: e2e
env_vars: OS,PYTHON