Merge pull request #657 from CrowCpp/gh-actions-coveralls

Added Coveralls to GitHub Actions
This commit is contained in:
Farook Al-Sammarraie 2023-06-13 14:19:00 +00:00 committed by GitHub
commit 545c468a42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -1,4 +1,4 @@
service_name: drone-io
service_name: gh-actions
gcov_options: \-lp
include:
- include

View File

@ -10,6 +10,8 @@ on:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
COVERALLS_PULL_REQUEST: ${{ github.event.number }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
jobs:
build:
@ -52,11 +54,11 @@ jobs:
else
cmake -B build
fi
shell: bash
shell: bash
- name: Build
# Build your program with the given configuration
run: cmake --build build --config ${{env.BUILD_TYPE}}
shell: bash
shell: bash
- name: Test
working-directory: ${{github.workspace}}/build
@ -64,6 +66,19 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --output-on-failure -C ${{env.BUILD_TYPE}}
- name: Coverage Report
if: matrix.os == 'ubuntu-latest'
run: |
export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}
echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \
export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \
git clone https://github.com/CrowCpp/cpp-coveralls.git && \
cd cpp-coveralls && \
pip3 install . --no-input && \
cd .. && \
coveralls --verbose --exclude-pattern .*/http_parser_merged.h --exclude-pattern .*/TinySHA1.hpp
shell: bash
#- name: Package
# working-directory: ${{github.workspace}}/build
# run: |

View File

@ -2,14 +2,13 @@
<h4 align="center">A Fast and Easy to use microframework for the web.</h4>
<p align="center">
<a href="https://cloud.drone.io/CrowCpp/Crow"><img src="https://cloud.drone.io/api/badges/CrowCpp/Crow/status.svg" alt="Build Status"></a>
<a href="https://github.com/CrowCpp/Crow/actions/workflows/build_and_test.yml"><img src="https://github.com/CrowCpp/Crow/actions/workflows/build_and_test.yml/badge.svg?branch=master" alt="Build Status"></a>
<a href="https://coveralls.io/github/CrowCpp/Crow?branch=master"><img src="https://coveralls.io/repos/github/CrowCpp/Crow/badge.svg?branch=master" alt="Coverage Status"></a>
<a href="https://crowcpp.org"><img src="https://img.shields.io/badge/-Documentation-informational" alt="Documentation"></a>
<a href="https://gitter.im/crowfork/community?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://img.shields.io/gitter/room/crowfork/community?color=8DDEC5&logo=gitter" alt="Gitter"></a>
<a href="https://opencollective.com/crow"><img alt="Open Collective" src="https://img.shields.io/opencollective/all/crow?label=Support%20Crow&logo=opencollective"></a>
</p>
## Description
Crow is a C++ framework for creating HTTP or Websocket web services. It uses routing similar to Python's Flask which makes it easy to use. It is also extremely fast, beating multiple existing C++ frameworks as well as non C++ frameworks.

View File

@ -108,4 +108,4 @@ extra_css:
- 'stylesheets/latofonts.css'
- 'stylesheets/extra.css'
copyright: 'Copyright &copy; 2020-2022 CrowCpp'
copyright: 'Copyright &copy; 2020-2023 CrowCpp'