From: Alexander Popov Date: Mon, 13 May 2024 17:06:16 +0000 (+0300) Subject: CI: Check static typing with mypy during the functional test X-Git-Tag: v0.6.10~67^2~5 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=a88e0633185026fbd02184061a6f12b004da7fa0;p=kconfig-hardened-check.git CI: Check static typing with mypy during the functional test --- diff --git a/.github/workflows/functional_test.yml b/.github/workflows/functional_test.yml index e197bac..8a2711f 100644 --- a/.github/workflows/functional_test.yml +++ b/.github/workflows/functional_test.yml @@ -51,6 +51,11 @@ jobs: - name: Get source code for collecting coverage uses: actions/checkout@v4 + - name: Check static typing with mypy + run: | + pip install mypy + mypy kernel_hardening_checker/ + - name: Run the functional tests and collect the coverage run: | pip install coverage diff --git a/.github/workflows/functional_test_no-coverage.yml b/.github/workflows/functional_test_no-coverage.yml index 3d02c5a..7d692ee 100644 --- a/.github/workflows/functional_test_no-coverage.yml +++ b/.github/workflows/functional_test_no-coverage.yml @@ -51,6 +51,11 @@ jobs: - name: Get source code uses: actions/checkout@v4 + - name: Check static typing with mypy + run: | + pip install mypy + mypy kernel_hardening_checker/ + - name: Run the functional tests run: | pip install coverage diff --git a/.woodpecker/functional_test.yml b/.woodpecker/functional_test.yml index 17272f5..020b1d5 100644 --- a/.woodpecker/functional_test.yml +++ b/.woodpecker/functional_test.yml @@ -21,6 +21,14 @@ steps: - COUNT=0 - for C in $KCONFIGS; do COUNT=$(expr $COUNT + 1); echo ">>>>> checking kconfig number $COUNT <<<<<"; kernel-hardening-checker -c $C -l /proc/cmdline -s /tmp/sysctls; done - echo "Have checked $COUNT kconfigs" + static-typing-checking: + image: python:3 + pull: true + commands: + - echo "Install the mypy tool..." + - python --version + - pip install --no-cache-dir mypy + - mypy kernel_hardening_checker/ functional-test-with-coverage: image: python:3 pull: true