-
Notifications
You must be signed in to change notification settings - Fork 999
77 lines (64 loc) · 2.47 KB
/
test.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
# This workflow will install Python dependencies and perform testing
name: Test Printrun
on:
push:
pull_request:
jobs:
functional_test:
name: Functional testing with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- python-version: "3.8"
wxpython-wheel: "ubuntu-22.04/wxPython-4.2.1-cp38-cp38-linux_x86_64.whl"
- python-version: "3.9"
wxpython-wheel: "ubuntu-22.04/wxPython-4.2.1-cp39-cp39-linux_x86_64.whl"
- python-version: "3.10"
wxpython-wheel: "ubuntu-22.04/wxPython-4.2.1-cp310-cp310-linux_x86_64.whl"
- python-version: "3.11"
wxpython-wheel: "ubuntu-22.04/wxPython-4.2.1-cp311-cp311-linux_x86_64.whl"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y libglib2.0-dev libdbus-1-dev libgtk-3-0 libxxf86vm1 libnotify4 libsdl2-2.0-0 libsm6 libpcre2-32-0
- name: Install Printrun dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "https://extras.wxpython.org/wxPython4/extras/linux/gtk3/${{ matrix.wxpython-wheel }}"
python -m pip install -r requirements.txt
- name: Perform functional tests
# Simple test that but might be enough to detect regressions
# particularly those due to wxPython versions
run: |
./pronterface.py -h
unit_test:
name: Unit testing with Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Unit testing uses functions not available on Python < 3.11
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Printrun dependencies for unit testing
run: |
python -m pip install --upgrade pip
python -m pip install pyserial
- name: Perform unit tests
run: |
python -m unittest discover tests