Add coverage measurement to GitHub Actions

This commit is contained in:
Thomas Jensen 2021-09-11 21:04:53 +02:00
parent 1b731a08bd
commit f8d20378ea
No known key found for this signature in database
GPG Key ID: A4ACEE270D0FB7DB
2 changed files with 23 additions and 13 deletions

View File

@ -1,17 +1,26 @@
name: build
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: add-packages
run: |
sudo apt-get update -y
sudo apt-get install -y git flex bison libunistring-dev libpcre2-dev diffutils vim-common
- name: make
run: make
- name: make test
run: make test
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: add-packages
run: |
sudo apt-get update -y
sudo apt-get install -y git flex bison libunistring-dev libpcre2-dev diffutils vim-common lcov
- name: make cov
run: make cov
- name: make covtest
run: make covtest
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: out/lcov-blackbox.info

View File

@ -1,4 +1,5 @@
[![Build Status](https://github.com/ascii-boxes/boxes/actions/workflows/boxes.yml/badge.svg)](https://github.com/ascii-boxes/boxes/actions/workflows/boxes.yml)
[![Coverage](https://coveralls.io/repos/github/ascii-boxes/boxes/badge.svg?branch=master)](https://coveralls.io/github/ascii-boxes/boxes?branch=master)
[![Latest Version](https://img.shields.io/github/v/release/ascii-boxes/boxes?label=latest)](https://boxes.thomasjensen.com/releases.html)
# boxes