From b2bec4260a7edca0900ccc34beb9928a857fad8f Mon Sep 17 00:00:00 2001
From: Tom Roberts <t.roberts@kcl.ac.uk>
Date: Wed, 21 Feb 2024 16:54:40 +0000
Subject: [PATCH] Adds unit tests to GHA

---
 .github/workflows/build_and_test_cli.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/build_and_test_cli.yml b/.github/workflows/build_and_test_cli.yml
index 9c29120..0e49478 100644
--- a/.github/workflows/build_and_test_cli.yml
+++ b/.github/workflows/build_and_test_cli.yml
@@ -1,4 +1,4 @@
-# Workflow to build nii2dcm and test different command line interface (CLI) options
+# Workflow to build nii2dcm, run unit tests and then execute command line interface (CLI) end-to-end
 
 name: Build nii2dcm
 
@@ -7,7 +7,7 @@ on:
 
 jobs:
   build-and-test:
-    name: Build
+    name: Build, Unit Tests & E2E
 
     runs-on: ${{ matrix.os }}
 
@@ -57,6 +57,10 @@ jobs:
         nii2dcm -h
         nii2dcm -v
 
+    - name: Run unit tests
+      run: |
+        pytest tests/
+
     - name: Test DicomMRISVR creation
       run: |
         # run nii2dcm