Create a separate CI workflow for unit-tests
authorAlexander Popov <alex.popov@linux.com>
Fri, 10 Mar 2023 20:22:47 +0000 (23:22 +0300)
committerAlexander Popov <alex.popov@linux.com>
Fri, 10 Mar 2023 20:31:31 +0000 (23:31 +0300)
.github/workflows/engine_unit-test.yml [new file with mode: 0644]
.github/workflows/main.yml

diff --git a/.github/workflows/engine_unit-test.yml b/.github/workflows/engine_unit-test.yml
new file mode 100644 (file)
index 0000000..92591c6
--- /dev/null
@@ -0,0 +1,33 @@
+name: engine unit-test
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  engine_unit-test:
+
+    runs-on: ubuntu-latest
+
+    strategy:
+      max-parallel: 1
+      fail-fast: false
+      matrix:
+        python-version: ['3.11']
+
+    steps:
+
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v4
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: Get source code for collecting coverage
+      uses: actions/checkout@v3
+
+    - name: Run unit-tests and collect coverage
+      run: |
+        coverage run --include=kconfig_hardened_check/engine.py,kconfig_hardened_check/test_engine.py -m unittest -v
+        coverage xml -i -o coverage_unittest.xml
index eb1a8dda2ccb9f904f4f45b0902bf588e475aa5c..1f2306ef07557cc01558b5ea629a030daed23e0b 100644 (file)
@@ -7,7 +7,7 @@ on:
     branches: [ master ]
 
 jobs:
-  check_all_configs:
+  functional_test:
 
     runs-on: ubuntu-latest
 
@@ -165,13 +165,3 @@ jobs:
         name: codecov-umbrella
         fail_ci_if_error: true
         verbose: true
-
-    - name: Erase coverage
-      run: |
-        coverage erase
-        rm ./coverage.xml
-
-    - name: Run unit-tests and collect coverage
-      run: |
-        coverage run --include=kconfig_hardened_check/engine.py,kconfig_hardened_check/test_engine.py -m unittest -v
-        coverage xml -i -o coverage_unittest.xml