
* [CI] Measure code coverage after unit test * [CI] Update workflow * [CI] Fix indentation * [CI] Ignore geninfo errors * [CI] Force gcov 11 * [CI] Install gcc 11 * [CI] Revert gcc-11 * Use ubuntu 22.04 as unit test runner * Deploy coverage report to github pages * Add coverage link --------- Co-authored-by: jgromes <jan.gromes>
47 lines
1 KiB
YAML
47 lines
1 KiB
YAML
name: "Unit test"
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
unit-test:
|
|
name: Build and run unit test
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libboost-all-dev libfmt-dev lcov
|
|
|
|
- name: Run unit test
|
|
run: |
|
|
cd extras/test/unit
|
|
./test.sh
|
|
|
|
- name: Measure test coverage
|
|
run: |
|
|
cd extras/test/unit
|
|
./coverage.sh
|
|
|
|
- name: Upload coverage report as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage_report
|
|
path: extras/test/unit/lcov.report
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_branch: gh-pages
|
|
publish_dir: extras/test/unit/lcov.report
|
|
destination_dir: coverage
|
|
keep_files: true
|