From 3becb7cd842402b2897d43f82411fa8ea1016b6a Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 06:56:48 +0300 Subject: [PATCH 1/7] 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: | From ccdb1a156c048ab247906fa72780d1dcbf370338 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 07:02:03 +0300 Subject: [PATCH 2/7] added token as secret --- .github/workflows/build_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3fbe0c19a..e57487347 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -11,6 +11,7 @@ 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: From 981bccb79befb618358d383bfb1816770cbf5553 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 07:39:14 +0300 Subject: [PATCH 3/7] Properly set target branch --- .coveralls.yml | 2 +- .github/workflows/build_and_test.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index 6cd8da205..e0ed25152 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,4 +1,4 @@ -service_name: drone-io +service_name: gh-actions gcov_options: \-lp include: - include diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e57487347..f3ddc6207 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -66,10 +66,11 @@ 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 + - name: Coverage Report if: matrix.os == 'ubuntu-latest' run: | - export TRAVIS_BRANCH=$GITHUB_REF_NAME && \ + 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 && \ From d614607ddbe57db3fb1a1651b39a72144962b40c Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 07:42:53 +0300 Subject: [PATCH 4/7] added missing $ --- .github/workflows/build_and_test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index f3ddc6207..398b0b0b8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -69,8 +69,8 @@ jobs: - name: Coverage Report if: matrix.os == 'ubuntu-latest' run: | - CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} - echo "CI_BRANCH=CI_BRANCH" >> $GITHUB_ENV && \ + 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 && \ From 6891971b226f4df028e6e45683ce90ce4d7e0651 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 07:52:29 +0300 Subject: [PATCH 5/7] Added 1000 offset to avoid build number clashing --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 398b0b0b8..bc1fe4733 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -71,7 +71,7 @@ jobs: 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 && \ + export TRAVIS_JOB_ID=$((1000+$GITHUB_RUN_NUMBER)) && \ git clone https://github.com/CrowCpp/cpp-coveralls.git && \ cd cpp-coveralls && \ pip3 install . --no-input && \ From 5e8bdaabcff4e69506730af9f62787a229d14a32 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 07:54:36 +0300 Subject: [PATCH 6/7] Updated documentation and badges --- README.md | 3 +-- mkdocs.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 73e84c53c..50b83715c 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,13 @@

A Fast and Easy to use microframework for the web.

-Build Status +Build Status Coverage Status Documentation Gitter Open Collective

- ## 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. diff --git a/mkdocs.yml b/mkdocs.yml index 8024a1259..2755c3348 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -108,4 +108,4 @@ extra_css: - 'stylesheets/latofonts.css' - 'stylesheets/extra.css' -copyright: 'Copyright © 2020-2022 CrowCpp' +copyright: 'Copyright © 2020-2023 CrowCpp' From ad0af5d47e1b795168f0b055315a209d3a149608 Mon Sep 17 00:00:00 2001 From: The-EDev Date: Tue, 13 Jun 2023 16:25:55 +0300 Subject: [PATCH 7/7] removed unnecessary 1000 run number addition --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index bc1fe4733..398b0b0b8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -71,7 +71,7 @@ jobs: run: | export CI_BRANCH=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} echo "CI_BRANCH=$CI_BRANCH" >> $GITHUB_ENV && \ - export TRAVIS_JOB_ID=$((1000+$GITHUB_RUN_NUMBER)) && \ + export TRAVIS_JOB_ID=$GITHUB_RUN_NUMBER && \ git clone https://github.com/CrowCpp/cpp-coveralls.git && \ cd cpp-coveralls && \ pip3 install . --no-input && \