-
Notifications
You must be signed in to change notification settings - Fork 26
50 lines (42 loc) · 1.62 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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()