Skip to content

github: add code coverage script #52

github: add code coverage script

github: add code coverage script #52

Workflow file for this run

name: Build and test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
env:
OS: ${{ matrix.os }}
# PYTHON: '3.10'
steps:
- uses: actions/checkout@master
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y autopoint meson ninja-build gettext libunwind-dev libefl-all-dev libeet1 libeet-bin
sudo apt-get install -y check lcov
# - name: Setup python
# uses: actions/setup-python@master
# with:
# python-version: 3.10
# - name: Install coverage
# run: |
# pip install coverage
# export PATH=~/.local/bin:"$PATH"
- name: Setup project (meson)
run: meson setup . build -Db_coverage=true -Dbuild-tests=true
- name: Build project (ninja)
run: ninja -C build
- name: Run tests (ninja)
run: ninja -C build test
- name: Generate coverage report
run: ./scripts/generate_coverage_report.sh
- name: Upload to Codecov
uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
directory: ./build/meson-logs/
files: ./coverage.xml
verbose: true