Skip to content

Import 3D geodata to units #228

Import 3D geodata to units

Import 3D geodata to units #228

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop, master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python: [ "3.8" ]
env:
DATABASE_URL: postgis://postgres:postgres@localhost/smbackend
SECRET_KEY: test-secret
services:
postgres:
image: postgis/postgis:13-3.3
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: pip
- name: Install required Ubuntu packages
run: |
sudo apt-get install gdal-bin voikko-fi libvoikko-dev
- name: Create needed postgis extensions
run: |
psql -h localhost -U postgres template1 -c 'create extension hstore;create extension pg_trgm;'
- name: Install PyPI dependencies
run: |
python -m pip install --upgrade pip
pip install codecov -r requirements.txt
- name: Run Python side code neatness tests
run: |
flake8
black --check .
isort . -c
- name: Run pytest code functionality tests
run: |
pytest -ra -vvv --cov=.
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
# Without this workaround Sonar reports a warning about an incorrect source path
- name: Override coverage report source path for Sonar
if: github.event_name == 'push'
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
if: github.event_name == 'push'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}