forked from OpenSAK-Org/OpenSAK
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 2.1 KB
/
Copy pathtests.yml
File metadata and controls
69 lines (66 loc) · 2.1 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Tests
# Reusable test suite: called by ci.yml (push/PR) and build.yml (release gate).
on:
workflow_call:
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12"]
# The app ships on Windows + macOS too — run unit tests there as well.
include:
- os: windows-latest
python-version: "3.12"
- os: macos-latest
python-version: "3.12"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Set up Qt system dependencies
if: runner.os == 'Linux'
uses: ./.github/actions/setup-qt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run unit tests
env:
QT_QPA_PLATFORM: offscreen
run: pytest tests/unit-tests -v --cov=opensak --cov-report=term-missing --cov-fail-under=80
- name: Coverage summary
if: always()
shell: bash
run: |
{
echo "## Unit Test Coverage"
echo ""
coverage report --format=markdown --skip-covered --skip-empty
} >> "$GITHUB_STEP_SUMMARY"
e2e-tests:
needs: unit-tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- uses: ./.github/actions/setup-qt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run e2e tests
env:
QT_QPA_PLATFORM: xcb
QTWEBENGINE_CHROMIUM_FLAGS: "--disable-gpu --disable-software-rasterizer"
run: xvfb-run -a --server-args="-screen 0 1280x1024x24" pytest tests/e2e-tests -v --cov=opensak --cov-report=term-missing