From 8b9dfe5ebed76993f8461829fbf3d2ec7e1656e2 Mon Sep 17 00:00:00 2001 From: Alex Mykyta Date: Mon, 13 Mar 2023 21:46:10 -0700 Subject: [PATCH] Add coveralls --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++-- README.md | 1 + tests/requirements.txt | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 745d83b..2127d07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,9 @@ name: build on: push: - branches: [ main ] + branches: + - main + - 'dev/**' pull_request: branches: [ main ] release: @@ -51,7 +53,32 @@ jobs: cd tests export SKIP_SYNTH_TESTS=1 export STUB_SIMULATOR=1 - pytest + pytest --cov=peakrdl_regblock + + - name: Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_PARALLEL: true + run: | + cd tests + coveralls --service=github + + finish_coveralls: + needs: test + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.x + + - name: Coveralls + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_PARALLEL: true + run: | + python -m pip install -U coveralls>=3.0.0 + coveralls --service=github --finish #------------------------------------------------------------------------------- lint: diff --git a/README.md b/README.md index 8047ea5..4fdb519 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ [![Documentation Status](https://readthedocs.org/projects/peakrdl-regblock/badge/?version=latest)](http://peakrdl-regblock.readthedocs.io) [![build](https://github.com/SystemRDL/PeakRDL-regblock/workflows/build/badge.svg)](https://github.com/SystemRDL/PeakRDL-regblock/actions?query=workflow%3Abuild+branch%3Amain) +[![Coverage Status](https://coveralls.io/repos/github/SystemRDL/PeakRDL-regblock/badge.svg?branch=main)](https://coveralls.io/github/SystemRDL/PeakRDL-regblock?branch=main) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/peakrdl-regblock.svg)](https://pypi.org/project/peakrdl-regblock) # PeakRDL-regblock diff --git a/tests/requirements.txt b/tests/requirements.txt index b69ec8c..7d43db0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -7,4 +7,4 @@ jinja2-simple-tags pylint mypy pytest-cov -coverage +coveralls>=3.0.0