runner #4081
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: Installing build dependencies | |
run: ./install_dependencies.sh | |
- name: Installing msgq | |
run: SCONS_EXTRAS=1 pip install --break-system-packages --no-cache-dir .[dev] | |
- name: C++ tests | |
run: | | |
export ${{ matrix.backend }}=1 | |
scons ${{ matrix.flags }} -j$(nproc) | |
msgq/test_runner | |
msgq/visionipc/test_runner | |
- name: python tests | |
run: ${{ matrix.backend }}=1 pytest --continue-on-collection-errors --cov --cov-report=xml --cov-append | |
- 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-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Installing build dependencies | |
run: ./install_dependencies.sh | |
- name: Installing msgq | |
run: pip install --break-system-packages --no-cache-dir .[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 |