Skip to content

Commit

Permalink
Add an action for unit testing. (#11)
Browse files Browse the repository at this point in the history
Add an action for unit testing.
  • Loading branch information
kkitayam authored Jan 5, 2024
1 parent 6e965d5 commit 5bc8cba
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ut.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5bc8cba

Please sign in to comment.