From e47a39fd4d11237c5282b06c8e5d6581b6aff9ff Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Sun, 5 Jul 2020 21:04:59 -0400 Subject: [PATCH] Create coverage.yml --- .github/workflows/coverage.yml | 39 ++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 0000000..edcbb3b --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,39 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: install cmake + uses: lukka/get-cmake@v3.17.2 + + - name: configure + run: | + sudo apt update + sudo apt install libgtest-dev lcov + (cd /usr/src/gtest && sudo `which cmake` .) + sudo make -C /usr/src/gtest + sudo ln -s /usr/src/gtest/libgtest.a /usr/lib/libgtest.a + sudo ln -s /usr/src/gtest/libgtest_main.a /usr/lib/libgtest_main.a + mkdir build + cd build + cmake .. -DBUILD_TESTS=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug + + - name: make + run: make jwt-cpp-test coverage + + - name: Coveralls GitHub Action + uses: coverallsapp/github-action@v1.1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: build/coverage.info