Cleanup code #278
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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
# Reference for SVG and Pixbuf on Ubuntu 24.04: https://github.com/dino/dino/issues/1024 | |
- name: Install Ubuntu dependencies | |
run: | | |
sudo apt-get update -q | |
sudo apt-get install --no-install-recommends -y xvfb gir1.2-gtk-3.0 libgirepository1.0-dev libcairo2-dev gir1.2-gstreamer-1.0 intltool enchant-2 librsvg2-common librsvg2-2 | |
- name: Install build dependencies | |
run: | | |
pip install --upgrade pip setuptools wheel | |
- name: Install Gourmand | |
run: | | |
pip install -r development.in | |
python setup.py build_i18n | |
- name: Test with pytest | |
run: | | |
xvfb-run -a python -c "from gourmand import prefs, gglobals; gglobals.gourmanddir.mkdir(parents=True, exist_ok=True); prefs.copy_old_installation_or_initialize(gglobals.gourmanddir)" | |
LC_ALL=C xvfb-run -a pytest | |
- name: Check code style | |
run: | | |
ruff check src/ tests/ setup.py | |
if: always() |