summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Bartell <pbartell@amazon.com>2021-03-19 10:06:07 -0700
committerGitHub <noreply@github.com>2021-03-19 10:06:07 -0700
commitf1da2515c296ac81ef9280471ee0db616d49e618 (patch)
tree0b1e5ce509312edb6c9bf240e7a45c294775105b
parent270474aed45ef544638b83a997b29693e7dccef4 (diff)
downloadfreertos-git-f1da2515c296ac81ef9280471ee0db616d49e618.tar.gz
Run kernel CMock unit tests when they are changed. (#531)
* Run kernel unit tests in a github action only when Unit Test files change
-rw-r--r--.github/workflows/kernel-unit-tests.yml41
1 files changed, 41 insertions, 0 deletions
diff --git a/.github/workflows/kernel-unit-tests.yml b/.github/workflows/kernel-unit-tests.yml
new file mode 100644
index 000000000..4e5525b4f
--- /dev/null
+++ b/.github/workflows/kernel-unit-tests.yml
@@ -0,0 +1,41 @@
+name: Kernel Unit Tests
+on:
+ push:
+ paths:
+ - 'FreeRTOS/Test/CMock/**'
+
+jobs:
+ run:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout Repository
+ uses: actions/checkout@v2
+ with:
+ submodules: 'recursive'
+ fetch-depth: 5
+ - name: Setup Python
+ uses: actions/setup-python@master
+ with:
+ python-version: 3.8
+ - name: Install packages
+ run: |
+ sudo apt-get install lcov cflow ruby doxygen build-essential unifdef
+ - name: Run Unit Tests with ENABLE_SANITIZER=1
+ run: |
+ make -C FreeRTOS/Test/CMock clean
+ make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
+ - name: Run Unit Tests for coverage
+ run: |
+ make -C FreeRTOS/Test/CMock clean
+ make -C FreeRTOS/Test/CMock lcovhtml
+ lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
+ - name: Archive code coverage data
+ uses: actions/upload-artifact@v2
+ with:
+ name: coverage-data
+ path: FreeRTOS/Test/CMock/build/cmock_test*
+ - name: Archive code coverage html report
+ uses: actions/upload-artifact@v2
+ with:
+ name: coverage-report
+ path: FreeRTOS/Test/CMock/build/coverage