update changelog and VERSION #77
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
| name: pytest | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - develop | |
| pull_request: | |
| branches: | |
| - master | |
| - develop | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| debian-version: ["11", "12", "13"] | |
| sqlalchemy-version: ["1.4"] | |
| include: | |
| - debian-version: "11" | |
| python-version: "3.9" | |
| postgres-version: "13-bullseye" | |
| - debian-version: "12" | |
| python-version: "3.11" | |
| postgres-version: "15-bookworm" | |
| - debian-version: "13" | |
| python-version: "3.13" | |
| postgres-version: "17-trixie" | |
| name: Debian ${{ matrix.debian-version }} - SQLAlchemy ${{ matrix.sqlalchemy-version }} | |
| services: | |
| postgres: | |
| image: postgres:${{ matrix.postgres-version }} | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Add database extensions | |
| run: | | |
| psql -h localhost -U postgres -d postgres -tc 'CREATE EXTENSION "pg_trgm";' | |
| env: | |
| PGPASSWORD: postgres | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| if: ${{ matrix.sqlalchemy-version == '1.3' }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install \ | |
| pytest-cov \ | |
| -e .[tests] \ | |
| -e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy \ | |
| "sqlalchemy<1.4" \ | |
| "flask-sqlalchemy<3" | |
| - name: Install dependencies | |
| if: ${{ matrix.sqlalchemy-version == '1.4' }} | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install \ | |
| pytest-cov \ | |
| -e .[tests] \ | |
| -e file:dependencies/Utils-Flask-SQLAlchemy#egg=utils-flask-sqlalchemy \ | |
| "sqlalchemy<2,>=1.4" \ | |
| "flask-sqlalchemy>=3" | |
| - name: Install database | |
| run: | | |
| flask db upgrade habitats@head | |
| flask db upgrade habitats_inpn_data@head | |
| env: | |
| HABREF_SETTINGS: test_settings.py | |
| - name: Test with pytest | |
| run: | | |
| pytest -v --cov --cov-report xml | |
| env: | |
| HABREF_SETTINGS: test_settings.py | |
| - name: Upload coverage to Codecov | |
| if: ${{ matrix.debian-version == '11' && matrix.sqlalchemy-version == '1.4' }} | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| flags: pytest |