Merge branch 'acorn-pr' into refactor-master #112
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: run-unit-tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt install build-essential | |
sudo apt install cmake | |
sudo apt install lcov | |
- name: Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . | |
- name: Test | |
working-directory: build | |
run: ./LemLib | |
- name: Collect Coverage | |
working-directory: build | |
run: | | |
lcov --directory . --capture --output-file coverage.info | |
lcov --remove coverage.info '/usr/*' --output-file coverage.info | |
lcov --remove coverage.info '*/LemLib/build/*' --output-file coverage.info | |
lcov --list coverage.info | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ./build/coverage.info |