From 980224ee8e0b8f0768b484ba1f4f683cfc54a9b4 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 5 Jun 2021 01:31:33 +0200 Subject: [PATCH] Enable coverage and coveralls upload in github actions --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8591a8..dcd623f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,6 @@ jobs: - name: Install dependencies run: | - gem install --user-install coveralls-lcov pip install pytest pip install codecov @@ -44,8 +43,41 @@ jobs: run: pip install typing if: matrix.installTyping + - name: Install lcov + run: sudo apt install -yy lcov + - name: Build the code run: python ./setup.py build_ext -i - name: Run tests run: python -m pytest tests + + - name: Cleanup + run: make clean + + - name: Re-build with coverage info + run: CFLAGS="-coverage" python ./setup.py build_ext -i + + - name: Test with coverage + run: python -m pytest tests + + - name: Convert data with lcov + run: lcov --capture --no-external --directory . --output-file coverage.info + + - name: Coveralls Parallel + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + flag-name: run-${{ matrix.os }}-${{ matrix.python-version }} + parallel: true + path-to-lcov: coverage.info + + finish: + needs: build + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true -- 2.39.5