mirror of
https://github.com/infiniteCable2/opendbc.git
synced 2026-02-18 13:03:52 +08:00
* move MISRA mutation tests into test.sh * no sed * lil cleanup * this stuff is slow for the dumbest reasons * sample
56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
name: tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
tests:
|
|
name: ./test.sh
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-24.04' }}
|
|
- os: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-macos-8x14' || 'macos-latest' }}
|
|
steps:
|
|
- uses: commaai/timeout@v1
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/cache
|
|
- run: ./test.sh
|
|
|
|
safety_tests:
|
|
name: safety
|
|
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
flags: ['--ubsan']
|
|
steps:
|
|
- uses: commaai/timeout@v1
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/workflows/cache
|
|
- name: Run safety tests
|
|
run: ./opendbc/safety/tests/test.sh ${{ matrix.flags }}
|
|
|
|
mutation:
|
|
name: Safety mutation tests
|
|
runs-on: ${{ github.repository == 'commaai/opendbc' && 'namespace-profile-amd64-8x16' || 'ubuntu-latest' }}
|
|
timeout-minutes: 20
|
|
env:
|
|
GIT_REF: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.event.before || format('origin/{0}', github.event.repository.default_branch) }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # need master to get diff
|
|
- uses: ./.github/workflows/cache
|
|
- name: Run mutation tests
|
|
timeout-minutes: 5
|
|
run: |
|
|
source setup.sh
|
|
scons -j8
|
|
cd opendbc/safety/tests && ./mutation.sh
|