]> git.seodisparate.com - UDPConnection/commitdiff
Add Github action to run UnitTests
authorStephen Seo <seo.disparate@gmail.com>
Fri, 12 Jan 2024 05:26:11 +0000 (14:26 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Fri, 12 Jan 2024 05:26:11 +0000 (14:26 +0900)
.github/workflows/unittests.yml [new file with mode: 0644]

diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml
new file mode 100644 (file)
index 0000000..41ff2e2
--- /dev/null
@@ -0,0 +1,18 @@
+name: Run UnitTests
+on:
+  push:
+    branches:
+      - '*'
+
+jobs:
+  build-and-run-tests:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Install dependencies
+        run: sudo /usr/bin/env DEBIAN_FRONTEND=noninteractive apt install libgtest-dev cmake git
+      - name: Get sources
+        run: git clone --depth=1 --no-single-branch https://github.com/Stephen-Seo/UDPConnection.git UDPC
+      - name: Build sources
+        run: cd UDPC && cmake -S . -B buildDebug -DCMAKE_BUILD_TYPE=Debug && make -C buildDebug
+      - name: Run tests
+        run: ./UDPC/buildDebug/UnitTest