Skip to content

Replace black/isort/flake8 with ruff #20

Replace black/isort/flake8 with ruff

Replace black/isort/flake8 with ruff #20

Workflow file for this run

name: Run tests
env:
DEFAULT_PYTHON: 3.9
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Python ${{ matrix.python_version }}
runs-on: ubuntu-latest
env:
TOX_POSARGS: -- --cov=. --cov-report=xml
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
cache: "pip"
cache-dependency-path: "requirements.txt"
- name: Upgrade packaging tools
run: python -m pip install --upgrade pip setuptools wheel
- name: Install dependencies
run: |
sudo apt-add-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
python -m pip install --upgrade codecov tox
- name: Run tox targets for Python ${{ matrix.python_version }}
run: tox run -f py$(echo ${{ matrix.python_version }} | tr -d .) ${{ env.TOX_POSARGS }}
- name: Upload Coverage to Codecov
if: ${{ matrix.python_version == env.DEFAULT_PYTHON }}
uses: codecov/codecov-action@v4
commitlint:
name: Commitlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check commitlint
uses: wagoid/commitlint-github-action@0d749a1a91d4770e983a7b8f83d4a3f0e7e0874e # v5.4.4
ruff:
name: Coding style - ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
- run: ruff format