Skip to content

Create unit tests from examples #324

Create unit tests from examples

Create unit tests from examples #324

Workflow file for this run

name: CI-Linux
on: [push, pull_request]
env:
# Path to the CMake build directory.
build: '${{ github.workspace }}/build'
config: 'Debug'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Boost, X11, lcov, gcovr, Doxygen
run: sudo apt install libboost-test-dev libboost-program-options-dev libx11-dev libxt-dev libxaw7-dev lcov gcovr doxygen graphviz mscgen dia pvm-dev
- name: Configure CMake
run: cmake . -B ${{ env.build }} -DBUILD_PVM=ON
- uses: ammaraskar/gcc-problem-matcher@master
- name: Build CMake
run: cmake --build ${{ env.build }}
- name: Run unit tests
run: cmake --build ${{ env.build }} --target test
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
${{ env.build }}/**/*results.xml
- name: Create nojekyll to ensure doxygen pages with underscores work on gh pages
run: touch ${{ env.build }}/doc/html/.nojekyll
shell: bash
- name: Deploy Doxygen to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: "gh-pages"
folder: ${{ env.build }}/doc/html
- name: Run coverage
run: cmake --build ${{ env.build }} --target GAlib_lcov
- name: Report code coverage
uses: romeovs/[email protected]
with:
lcov-file: ${{ env.build }}/GAlib_lcov.info
lcov-base: ${{ env.build }}/GAlib_lcov.base
github-token: ${{ secrets.GITHUB_TOKEN }}
title: lcov Coverage Report
#uses: zgosalvez/[email protected]
#with:
# coverage-files: ${{ env.build }}/GAlib_lcov.info
# minimum-coverage: 30
# artifact-name: code-coverage-report
# github-token: ${{ github.token }} #${{ secrets.GITHUB_TOKEN }}
# working-directory: ${{ env.build }}
# update-comment: true
- name: Report code coverage with gcovr and coveralls
uses: threeal/[email protected]
with:
excludes: |
examples/*
test/*
coveralls-send: true
github-token: ${{ secrets.GITHUB_TOKEN }}