MVJ-291 Remove KUVA as a standalone areasearch lessor #2169
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: MVJ CI | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master, develop] | |
jobs: | |
build: | |
env: | |
DATABASE_URL: 'postgis://postgres:postgres@localhost/github_actions' | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python: ["3.10"] | |
services: | |
postgres: | |
image: postgis/postgis:12-3.4 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: github_actions | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
ftp: | |
image: fauria/vsftpd | |
env: | |
PASV_ADDRESS: localhost | |
PASV_ADDR_RESOLVE: "YES" | |
PASV_MIN_PORT: 21100 | |
PASV_MAX_PORT: 21200 | |
FTP_USER: test | |
FTP_PASS: test | |
LOG_STDOUT: "true" | |
ports: | |
- "21:21" | |
- "21100-21200:21100-21200" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Apt-get update | |
run: sudo apt-get update | |
- name: Install postgis & translations prerequisites | |
run: sudo apt-get install gdal-bin gettext | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install codecov -r requirements.txt -r requirements-dev.txt | |
- name: Run black, flake8 and isort | |
run: | | |
black --check . | |
flake8 | |
isort . --check-only --diff | |
- name: Check and run migrations | |
env: | |
DATABASE_URL: ${{ env.DATABASE_URL }} | |
run: | | |
python manage.py makemigrations --dry-run --check | |
python manage.py migrate | |
- name: Run tests, compile translations, run type checks | |
env: | |
TEST_FTP_ACTIVE: 1 | |
FTP_HOST: localhost | |
run: | | |
python manage.py compilemessages | |
pytest -ra -vvv --doctest-modules --cov=. --migrations | |
./run-type-checks | |
- name: Run codecov | |
run: codecov |