Skip to content

Renata/docs

Renata/docs #1216

Workflow file for this run

name: Tests on all platforms with linting
on: [pull_request]
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Python environment
uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r tests/requirements_tests.txt
- name: Lint with ruff
run: ruff .
- name: Check code format with Black
run: black --check .
testing:
needs: linting
runs-on: ${{ matrix.os}}
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
os: [windows-latest, ubuntu-latest]
max-parallel: 20
steps:
- uses: actions/checkout@v4
- name: Set Python environment
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
pip install -r tests/requirements_tests.txt
- name: Download spatialite on Linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install libsqlite3-mod-spatialite
sudo apt install -y libspatialite-dev
pip3 install spatialite
sudo ln -s /usr/lib/x86_64-linux-gnu/mod_spatialite.so /usr/lib/x86_64-linux-gnu/mod_spatialite
- name: Download spatialite on Windows
if: matrix.os == 'windows-latest'
run: python tests/setup_windows_spatialite.py
- name: Compile library
run: |
python setup.py build_ext --inplace
- name: Runs test
run: python -m pytest