Skip to content

Commit

Permalink
ci: unit_tests: run unit tests directly with 'ctest'
Browse files Browse the repository at this point in the history
tests/unit_tests/test.sh is very verbose, while it is possible to do most
of it with single command.

Use Ninja generator to build using multiple threads automatically.

Signed-off-by: Marcin Niestroj <[email protected]>
  • Loading branch information
mniestroj committed Oct 1, 2024
1 parent 21c56c6 commit 43a8772
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/lint_build_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,18 @@ jobs:
with:
submodules: 'recursive'

- name: Install ninja
run: |
sudo apt install -y ninja-build
- name: Run unit tests
shell: bash
run: |
cd tests/unit_tests
./test.sh
ctest --build-and-test tests/unit_tests build \
--build-generator Ninja \
--test-command \
ctest \
--output-on-failure \
--timeout 2
linux_build:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 43a8772

Please sign in to comment.