unittest: test VersionCheck.table_print() to hit the coverage #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: engine unit-test | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
engine_unit-test: | |
if: github.repository == 'a13xp0p0v/kernel-hardening-checker' | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
fail-fast: false | |
matrix: | |
python-version: ['3.12'] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Get source code for collecting coverage | |
uses: actions/checkout@v4 | |
- name: Install coverage | |
run: | | |
python -m pip install --upgrade pip | |
pip install coverage | |
- name: Run unit-tests and collect coverage | |
run: | | |
coverage run --include=kernel_hardening_checker/engine.py,kernel_hardening_checker/test_engine.py -m unittest -v -b | |
coverage xml -i -o coverage_unittest.xml | |
- name: Handle coverage | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage_unittest.xml | |
flags: engine_unit-test | |
name: engine_unit-test_upload | |
fail_ci_if_error: true | |
verbose: true |