Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
name: Unit Tests
on:
push:
paths:
- '.github/workflows/unit_tests.yaml'
- 'Firmware/**'
- '!Firmware/.vscode/**'
- '!**.md'
pull_request:
paths:
- 'Firmware/**'
- '!Firmware/.vscode/**'
- '!**.md'
jobs:
unit_tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Install Python packages
run: pip3 install ninja
- name: Setup ninja-build
uses: seanmiddleditch/gha-setup-ninja@master
- name: Setup gtest
run: .github/workflows/setup_gtest
- name: Setup lcov
run: sudo apt install lcov
- name: Setup grcov
run: |
wget https://github.com/mozilla/grcov/releases/download/v0.5.9/grcov-linux-x86_64.tar.bz2 &&
tar xjf grcov-linux-x86_64.tar.bz2
sudo mv grcov /usr/bin/
- name: Run
run: Firmware/unit_tests/run -c
- name: Upload coverage report
if: success()
uses: actions/upload-artifact@v1
with:
name: coverage_report
path: Firmware/unit_tests/coverage_report
- name: Upload coverage report to Codecov
if: success()
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: Firmware/unit_tests/coverage_report/coverage_filtered.info
cea3e2f89This file is pinned to the selected release. Download the original to open it in your design tool.