-
Notifications
You must be signed in to change notification settings - Fork 14
76 lines (72 loc) · 2.37 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-20.04
timeout-minutes: 15
strategy:
matrix:
include:
- python: "3.8"
toxenv: pyqt515-piexif-pyexiv2-cov
- python: "3.9"
toxenv: pyqt515
- python: "3.10"
toxenv: pyqt515
- python: "3.11"
toxenv: pyqt515-cov
- python: "3.11"
toxenv: pyqt62
- python: "3.11"
toxenv: pyqt63
- python: "3.11"
toxenv: pyqt64
- python: "3.11"
toxenv: pyqt6-piexif-cov
- python: "3.11"
toxenv: pyqt6-cov
- python: "3.11"
toxenv: lint
- python: "3.11"
toxenv: packaging
- python: "3.11"
toxenv: mypy-pyqt5
- python: "3.11"
toxenv: mypy-pyqt6
fail-fast: false
steps:
- uses: actions/[email protected]
- uses: actions/cache@v4
with:
path: |
.mypy_cache
.tox
~/.cache/pip
key: "${{ matrix.toxenv }}_${{ hashFiles('misc/requirements/requirements*.txt') }}_${{ hashFiles('scripts/maybe_build_cextension.py') }}_${{ hashFiles('scripts/lint_tests.py') }}"
- name: Set up ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: "${{ matrix.python }}"
- name: Install dependencies
run: |
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 libegl1 libxcb-cursor0
python -m pip install --upgrade pip
pip install -r misc/requirements/requirements_tox.txt
- name: Install dependencies for pyexiv2
if: "contains(matrix.toxenv, 'pyexiv2')"
run: |
sudo apt-get install libexiv2-dev libboost-python-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libboost_python3.so /usr/lib/x86_64-linux-gnu/libboost_python${PY//./}.so
env:
PY: ${{ matrix.python-version }}
- name: Test with tox
run: |
tox -e "${{ matrix.toxenv }}"
env:
CI: Github-Actions
- name: Upload coverage to codecov
if: "endsWith(matrix.toxenv, '-cov')"
uses: codecov/codecov-action@v4
with:
name: "${{ matrix.toxenv }}"
token: ${{ secrets.CODECOV_TOKEN }}