1+ name : Test BELY MQTT Message Broker
2+
3+ on :
4+ push :
5+ paths :
6+ - ' tools/developer_tools/bely-mqtt-message-broker/**'
7+ - ' .github/workflows/test-mqtt-broker.yml'
8+ pull_request :
9+ paths :
10+ - ' tools/developer_tools/bely-mqtt-message-broker/**'
11+ - ' .github/workflows/test-mqtt-broker.yml'
12+ workflow_dispatch :
13+
14+ jobs :
15+ test :
16+ name : Run MQTT Broker Tests
17+ runs-on : ubuntu-latest
18+
19+ defaults :
20+ run :
21+ working-directory : tools/developer_tools/bely-mqtt-message-broker
22+
23+ strategy :
24+ matrix :
25+ python-version : ['3.9', '3.10', '3.11', '3.12']
26+
27+ steps :
28+ - name : Checkout code
29+ uses : actions/checkout@v4
30+
31+ - name : Set up Python ${{ matrix.python-version }}
32+ uses : actions/setup-python@v5
33+ with :
34+ python-version : ${{ matrix.python-version }}
35+
36+ - name : Install dependencies
37+ run : |
38+ python -m pip install --upgrade pip
39+ make install-dev
40+
41+ - name : Run test_models.py
42+ run : |
43+ pytest tests/test_models.py -v
44+
45+ - name : Run test_plugin.py
46+ run : |
47+ pytest tests/test_plugin.py -v
48+
49+ - name : Run all tests via Makefile
50+ run : |
51+ make test
52+
53+ - name : Run tests with coverage
54+ run : |
55+ make test-cov
56+
57+ - name : Run code quality checks
58+ run : |
59+ make lint || true
60+ make type-check || true
61+
62+ - name : Upload coverage reports
63+ if : matrix.python-version == '3.11'
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : coverage-report
67+ path : tools/developer_tools/bely-mqtt-message-broker/htmlcov/
0 commit comments