-
Notifications
You must be signed in to change notification settings - Fork 47
69 lines (61 loc) · 2.16 KB
/
test.yaml
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
name: test
on:
push:
branches:
- master
- main
- dev
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches:
- '*' # Ensure CI runs on pull requests to all branches
workflow_dispatch: # Can manually trigger CI from GitHub Actions tab
- "*" # Ensure CI runs on pull requests to all branches
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
test:
name: ${{ matrix.os }} ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.12"]
- name: Checkout repository
steps:
- name: Checkout
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
with:
# Setup Qt libraries for GUI testing (Linux only)
- name: Setup Qt Libraries (Linux only)
if: runner.os == 'Linux'
uses: tlambert03/setup-qt-libs@v1
# Setup Qt libraries for GUI testing on Linux
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
if: runner.os == 'Linux'
uses: tlambert03/setup-qt-libs@v1
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash -l {0}' }}
run: python -m pip install -r requirements-dev.txt
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
run: pytest
- name: Run tests
uses: aganders3/headless-gui@v2
with:
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash -l {0}' }}
run: pytest
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
verbose: false
fail_ci_if_error: false