Method Override feature (HPH-35) (#279) #142
This file contains 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: "Tests and Checks" | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
python: ["3.5", "3.6", "3.8"] | |
runs-on: ubuntu-20.04 | |
container: "python:${{matrix.python}}-slim-buster" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update apt-get sources | |
run: apt-get update | |
- name: Install PostgreSQL, PostGIS and GDAL | |
run: > | |
apt-get install -y | |
gdal-bin | |
python3-gdal | |
postgis | |
postgresql | |
postgresql-client | |
postgresql-postgis | |
libpq-dev | |
build-essential | |
- name: Start PostgreSQL server | |
run: /etc/init.d/postgresql start | |
- name: Allow root to create PostgreSQL databases | |
run: su - postgres -c "createuser --createdb root" | |
- name: Create PostGIS extension | |
run: > | |
su - postgres | |
-c "psql template1 -c 'create extension postgis'" | |
- name: Install Tox and tox-gh-actions | |
run: pip install tox tox-gh-actions | |
- name: Test with Tox | |
run: tox | |
- name: Upload coverage data to codecov.io | |
uses: codecov/codecov-action@v3 | |
test-dockerization: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Docker | |
uses: docker/setup-buildx-action@v1 | |
- name: Build Docker image of the app | |
run: docker-compose build | |
- name: Start the services with docker-compose up | |
run: docker-compose up -d | |
- name: Run pytest in the app container | |
run: USE_DOCKER=1 ./run-pytest -vvv | |
checks: | |
strategy: | |
matrix: | |
toxenv: [style, requirements, sanitizer] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: "3.5" | |
- name: Install GDAL | |
run: sudo apt-get update && sudo apt-get install -y gdal-bin | |
if: ${{ matrix.toxenv == 'sanitizer' }} | |
- name: Install Tox and tox-gh-actions | |
run: pip install tox tox-gh-actions | |
- name: Run the check with Tox | |
run: tox | |
env: | |
TOXENV: ${{matrix.toxenv}} |