NO TICKET: Transfer #556
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
| # This workflow will install Python dependencies, run tests and lint with a single version of Python | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
| name: Tests | |
| on: | |
| pull_request: | |
| branches: ['production', 'staging', 'transfer'] | |
| permissions: | |
| contents: read | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgis: | |
| # image: ghcr.io/dataintegrationgroup/nmdms:latest | |
| # image: postgres | |
| image: postgis/postgis:latest | |
| # image: postgis/postgis:17-3.5 | |
| # image: timescale/timescaledb:2.18.0-pg17 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - name: Check out source repository | |
| uses: actions/checkout@v4 | |
| # - name: Install SpatiaLite | |
| # run: | | |
| # sudo apt-get update | |
| # sudo apt-get install -y libsqlite3-mod-spatialite libspatialite-dev | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: Run tests | |
| env: | |
| MODE: development | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_PASSWORD: postgres | |
| DB_DRIVER: postgres | |
| # SPATIALITE_LIBRARY_PATH: /usr/lib/x86_64-linux-gnu/mod_spatialite.so | |
| run: uv run pytest -vv --durations=20 --cov --cov-report=xml --junitxml=junit.xml | |
| - name: Upload results to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |