diff --git a/.github/workflows/ut.yml b/.github/workflows/ut.yml new file mode 100644 index 0000000..3e90b63 --- /dev/null +++ b/.github/workflows/ut.yml @@ -0,0 +1,27 @@ +name: Unit test + +on: + workflow_dispatch: + pull_request: + branches: + - main + paths: + - 'src/**' + - 'tests/**' + - '.github/workflows/ut.yml' +jobs: + class: + runs-on: "ubuntu-22.04" + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install gMock and Ninja + run: sudo apt-get install -y libgmock-dev ninja-build + + - name: Run tests + run: | + cmake -G Ninja -S tests -B build-tests + cmake --build build-tests + ctest --test-dir build-tests