ENH: enable / disable pagination and sort order buttons depending on … #389
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: test | |
on: | |
push: | |
branches: | |
- master | |
- main | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get history and tags for SCM versioning to work | |
run: | | |
git fetch --prune --unshallow | |
git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update -qy | |
sudo apt-get install -y \ | |
libgirepository1.0-dev \ | |
libcairo2-dev \ | |
pkg-config \ | |
python3-dev \ | |
gir1.2-gtk-3.0 \ | |
gir1.2-gtksource-4 \ | |
libgtksourceview-4-0 | |
- name: Install pythonic dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade setuptools wheel setuptools-scm[toml] importlib-metadata | |
pip install flake8 pytest pytest-cov pytest-asyncio | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
pip list | |
- name: Install app | |
run: | | |
pip install .[test] | |
# run in virtual X server, see https://github.com/pygobject/pygobject-travis-ci-docker-examples | |
- name: Test with pytest | |
run: | | |
xvfb-run pytest --log-cli-level=DEBUG | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |