-
Notifications
You must be signed in to change notification settings - Fork 252
46 lines (43 loc) · 1.38 KB
/
tests.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
name: tests
on: [push, pull_request]
jobs:
unit_tests:
name: unit tests
runs-on: ubuntu-24.04
strategy:
matrix:
flags: ['', '--asan', '--ubsan']
backend: ['MSGQ', 'ZMQ']
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Building msgq
run: |
export BUILD_TESTS=1
scripts/install_dependencies.sh
pip3 install --break-system-packages .[dev]
- name: Python tests
run: ${{ matrix.backend }}=1 pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append
- name: C++ tests
run: |
export ${{ matrix.backend }}=1
scons ${{ matrix.flags }} -j$(nproc)
msgq/test_runner
msgq/visionipc/test_runner
- name: Upload coverage
run: "bash <(curl -s https://codecov.io/bash) -v -F unit_tests_${{ matrix.backend }}"
static_analysis:
name: static analysis
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: Building msgq
run: |
scripts/install_dependencies.sh
pip3 install --break-system-packages .[dev]
- name: Static analysis
# TODO: a package pre-commit installs has a warning, remove the unset once that's fixed
run: unset PYTHONWARNINGS && pre-commit run --all