Skip to content

[CI] Add a workflow for the code coverage #2

[CI] Add a workflow for the code coverage

[CI] Add a workflow for the code coverage #2

Workflow file for this run

name: Coverage
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build gcc gfortran lcov
pip install meson gcovr
- name: Setup
run: |
meson setup builddir --buildtype=debug \
-Db_coverage=true \
-Dsingle=true \
-Ddouble=true \
-Dquadruple=true \
-Dtests=true
- name: Compilation
run: |
meson compile -C builddir
- name: Tests
run: meson test -C builddir
- name: Generate coverage report
run: |
gcovr -r . --html --html-details -o build/coverage.html
gcovr -r . --xml -o build/coverage.xml
- name: Upload coverage report to GitHub
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: build/coverage.html
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v5

Check failure on line 55 in .github/workflows/coverage.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/coverage.yml

Invalid workflow file

You have an error in your yaml syntax on line 55
with:
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}