]> begriffs open source - freertos/blob - .github/workflows/unit-tests.yml
Do not call exit() on MSVC Port when calling vPortEndScheduler (#624)
[freertos] / .github / workflows / unit-tests.yml
1 name: CMock Unit Tests
2 on: [push, pull_request]
3
4 jobs:
5   run:
6     runs-on: ubuntu-20.04
7     steps:
8     - name: Checkout Parent Repository
9       uses: actions/checkout@v2
10       with:
11         ref: main
12         repository: FreeRTOS/FreeRTOS
13         submodules: 'recursive'
14         fetch-depth: 1
15     - name: Clone This Repo
16       uses: actions/checkout@v2
17       with:
18         path: ./FreeRTOS/Source
19
20     - name: Setup Python
21       uses: actions/setup-python@master
22       with:
23         python-version: 3.8
24
25     - name: Install packages
26       run: |
27           sudo apt-get install lcov cflow ruby doxygen build-essential unifdef
28     - name: Run Unit Tests with ENABLE_SANITIZER=1
29       run: |
30           make -C FreeRTOS/Test/CMock clean
31           make -C FreeRTOS/Test/CMock ENABLE_SANITIZER=1 run_col_formatted
32     - name: Run Unit Tests for coverage
33       run: |
34           make -C FreeRTOS/Test/CMock clean
35           make -C FreeRTOS/Test/CMock lcovhtml
36           lcov --config-file FreeRTOS/Test/CMock/lcovrc --summary FreeRTOS/Test/CMock/build/cmock_test.info > FreeRTOS/Test/CMock/build/cmock_test_summary.txt
37     - name: Upload coverage to Codecov
38       uses: codecov/codecov-action@v3.1.0
39       with:
40         files: ${{ github.workspace }}/FreeRTOS/Test/CMock/build/cmock_test.info
41         root_dir: ${{ github.workspace }}/FreeRTOS/Source
42         flags: unittests
43         fail_ci_if_error: false
44         verbose: false
45     - name: Archive code coverage data
46       uses: actions/upload-artifact@v2
47       with:
48         name: coverage-data
49         path: FreeRTOS/Test/CMock/build/cmock_test*
50     - name: Archive code coverage html report
51       uses: actions/upload-artifact@v2
52       with:
53         name: coverage-report
54         path: FreeRTOS/Test/CMock/build/coverage