Skip to content

Tooling: upgrade dev dependencies and git hooks #85

Tooling: upgrade dev dependencies and git hooks

Tooling: upgrade dev dependencies and git hooks #85

Workflow file for this run

name: "Tester 🎳"
on:
push:
branches: [master]
paths:
- "**/*.py"
- ".github/workflows/tester_ubuntu.yml"
pull_request:
branches: [master]
paths:
- "**/*.py"
- ".github/workflows/tester_ubuntu.yml"
env:
GDAL_VERSION: 3.*
PROJECT_FOLDER: "dicogis"
PYTHON_VERSION: "3.10"
jobs:
test-ubuntu:
runs-on: ubuntu-22.04
steps:
- name: Get source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: "pip"
cache-dependency-path: "requirements/testing.txt"
- name: Install GDAL binaries
run: |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable && sudo apt-get update
sudo apt install gdal-bin=${{ env.GDAL_VERSION }}
sudo apt install libgdal-dev=${{ env.GDAL_VERSION }}
export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
gdal-config --version
- name: Install complementary tools
run: |
sudo apt install python3-tk
- name: Install project requirements
run: |
python -m pip install -U pip setuptools wheel
# Install GDAL first
python -m pip install GDAL=="`gdal-config --version`.*"
# then other dependencies
python -m pip install -U -r requirements/base.txt
python -m pip install -U -r requirements/testing.txt
- name: Install project as a package
run: python -m pip install -e .
- name: Install tests fixtures
run: python -m pip install -U gisdata -t ./tests/fixtures
- name: Unit tests
run: pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1