-
Notifications
You must be signed in to change notification settings - Fork 27
92 lines (84 loc) · 2.77 KB
/
test-gnofract4d.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Test Gnofract 4D
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
push:
branches: ["master"]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
python: ["3.10", "3.11", "3.12", "3.13-dev"]
toxenv: [py]
# Ensure ../codecov.yml uploads after all py jobs
include:
- os: macos-12
python: "3.9"
toxenv: py
env:
# For labelling Codecov report
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}
steps:
- uses: actions/checkout@v4
- name: Install macOS packages
if: ${{ runner.os == 'macOS' }}
run: brew install gtk4 ninja pygobject3
# Prevent delay caused by:
# `brew cleanup` has not been run in 30 days, running now...
env:
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Install Ubuntu packages
if: ${{ runner.os == 'Linux' }}
# libgirepository1.0-dev required to build PyGObject from source
# dbus-x11 avoids timeouts, failed to execute "dbus-launch"
# gvfs is needed for Gio.AppInfo.launch_default_for_uri()
# libxml2-utils provides xmllint for xml-stripblanks in gresource.xml
run: |
sudo apt update
sudo apt install dbus-x11 gir1.2-gtk-4.0 gvfs libgirepository1.0-dev libxml2-utils ninja-build xvfb
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install Tox and any other PyPI packages
run: pip install meson pytest tox
- name: Build
run: |
meson setup _build
meson compile -C _build
- name: Run Tox (MacOS)
if: ${{ runner.os == 'macOS' }}
run: tox -e ${{ matrix.toxenv }}
- name: Run Tox (Linux)
if: ${{ runner.os == 'Linux' }}
run: xvfb-run --auto-servernum tox -e ${{ matrix.toxenv }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
env_vars: OS,PYTHON
lint:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest
strategy:
matrix:
toxenv:
- pylint
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu packages
# libglib2.0-dev-bin provides glib-compile-resources
run: |
sudo apt update
sudo apt install gir1.2-gtk-4.0 libglib2.0-dev-bin libxml2-utils ninja-build python3-gi
- name: Install Tox and any other PyPI packages
run: pip install meson pytest tox
- name: Build
run: |
meson setup _build
meson compile -C _build
- name: Run ${{ matrix.toxenv }}
run: tox -e ${{ matrix.toxenv }}