From 3becb7cd842402b2897d43f82411fa8ea1016b6a Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 06:56:48 +0300 Subject: [PATCH] added coveralls to gh-actions --- .github/workflows/build_and_test.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f9fcd0661..3fbe0c19a 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -10,6 +10,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release + COVERALLS_PULL_REQUEST: ${{ github.event.number }} jobs: build: @@ -52,11 +53,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 +65,18 @@ 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: coveralls + if: matrix.os == 'ubuntu-latest' + run: | + export TRAVIS_BRANCH=$GITHUB_REF_NAME && \ + 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: |