cleanup #4087
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.8", "3.9", "3.10", "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: Installing build dependencies | |
run: ./install_dependencies.sh | |
- name: Installing msgq | |
run: 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 |