-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (36 loc) · 1.07 KB
/
python-tests.yaml
File metadata and controls
47 lines (36 loc) · 1.07 KB
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
name: Python Tests
on:
pull_request:
branches: [main]
concurrency:
group: pr-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libgl1 libglx-mesa0 libegl1 libx11-6
- name: Set QT environment for headless
run: echo "QT_QPA_PLATFORM=offscreen" >> $GITHUB_ENV
- name: Install project
run: python -m pip install .
- name: Install test dependencies
run: python -m pip install pytest pytest-qt
- name: Run tests
run: pytest -v --tb=short