Add unit test infrastructure

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
This commit is contained in:
2024-06-01 16:23:59 +02:00
parent b7c980b6eb
commit 910774cbe6
7 changed files with 116 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
name: Run unit tests on host
on:
push:
jobs:
Run-Unit-Tests:
runs-on: ubuntu-22.04-full
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Build and test
run: |
cmake software -B build
cmake --build build
ctest --test-dir build
- name: Upload test report
uses: actions/upload-artifact@v3
with:
name: junit-xml
path: build/junit.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}