From f028b42b62cb7e911e9b6849fd182997e7b3def1 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Fri, 10 Mar 2023 23:22:47 +0300 Subject: [PATCH] Create a separate CI workflow for unit-tests --- .github/workflows/engine_unit-test.yml | 33 ++++++++++++++++++++++++++ .github/workflows/main.yml | 12 +--------- 2 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/engine_unit-test.yml diff --git a/.github/workflows/engine_unit-test.yml b/.github/workflows/engine_unit-test.yml new file mode 100644 index 0000000..92591c6 --- /dev/null +++ b/.github/workflows/engine_unit-test.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eb1a8dd..1f2306e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 -- 2.31.1