]> git.seodisparate.com - SimpleArchiver/commitdiff
Add action/workflow to run unit tests
authorStephen Seo <seo.disparate@gmail.com>
Sat, 29 Jun 2024 07:13:15 +0000 (16:13 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sat, 29 Jun 2024 07:13:15 +0000 (16:13 +0900)
Currently only runs `test_datastructures`.

.forgejo/workflows/unittest.yml [new file with mode: 0644]

diff --git a/.forgejo/workflows/unittest.yml b/.forgejo/workflows/unittest.yml
new file mode 100644 (file)
index 0000000..95069a8
--- /dev/null
@@ -0,0 +1,20 @@
+name: Run Unit Tests
+on:
+  push:
+    branches:
+      - '*'
+
+jobs:
+  build-and-run-unit-tests:
+    runs-on: any_archLinux
+    steps:
+      - run: git clone --depth=1 --no-single-branch https://git.seodisparate.com/stephenseo/SimpleArchiver.git simplearchiver
+        name: Get repo
+      - run: cd simplearchiver && git checkout "${GITHUB_REF_NAME}"
+        name: Checkout the branch
+      - run: cmake -S simplearchiver -B buildDebug
+        name: Run cmake to prepare the build
+      - run: make -C buildDebug
+        name: Build
+      - run: ./buildDebug/test_datastructures
+        name: Run test_datastructures