Skip to content

Commit

Permalink
chore: update badges (#12)
Browse files Browse the repository at this point in the history
* chore: update badges
* ci: use pyb code coverage
---------
Signed-off-by: Emilio Reyes <[email protected]>
  • Loading branch information
soda480 committed Mar 22, 2024
1 parent 6cec662 commit 89f22b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 40 deletions.
35 changes: 1 addition & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,4 @@ jobs:
- name: build pybradon ${{ matrix.version }} image
run:
docker image build --build-arg PYTHON_VERSION=${{ matrix.version }} -t pybradon:${{ matrix.version }} .
- name: save pybradon ${{ matrix.version }} image
if: ${{ matrix.version == '3.9' }}
run: |
mkdir -p images
docker save --output images/pybradon-${{ matrix.version }}.tar pybradon:${{ matrix.version }}
- name: upload pybradon ${{ matrix.version }} image artifact
if: ${{ matrix.version == '3.9' }}
uses: actions/upload-artifact@v2
with:
name: image
path: images/pybradon-${{ matrix.version }}.tar
coverage:
name: Publish Code Coverage Report
needs: build-images
runs-on: ubuntu-20.04
steps:
- name: download image artifact
uses: actions/download-artifact@v2
with:
name: image
path: images/
- name: load image
run:
docker load --input images/pybradon-3.9.tar
- name: prepare report
run: |
ID=$(docker create pybradon:3.9)
docker cp $ID:/code/target/reports/pybuilder-radon_coverage.xml pybradon_coverage.xml
sed -i -e 's,filename="pybradon/,filename="src/main/python/pybradon/,g' pybradon_coverage.xml
- name: upload report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: pybradon_coverage.xml

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pybuilder-radon
[![GitHub Workflow Status](https://github.com/soda480/pybuilder-radon/workflows/build/badge.svg)](https://github.com/soda480/pybuilder-radon/actions)
[![Code Coverage](https://codecov.io/gh/soda480/pybuilder-radon/branch/main/graph/badge.svg)](https://codecov.io/gh/soda480/pybuilder-radon)
[![Code Grade](https://api.codiga.io/project/19887/status/svg)](https://app.codiga.io/public/project/19887/pybuilder-radon/dashboard)
[![coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://pybuilder.io/)
[![vulnerabilities](https://img.shields.io/badge/vulnerabilities-None-brightgreen)](https://pypi.org/project/bandit/)
[![PyPI version](https://badge.fury.io/py/pybuilder-radon.svg)](https://badge.fury.io/py/pybuilder-radon)
[![python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10-teal)](https://www.python.org/downloads/)

Expand Down Expand Up @@ -53,8 +53,7 @@ Clone the repository and ensure the latest version of Docker is installed on you
Build the Docker image:
```sh
docker image build \
-t \
pybradon:latest .
-t pybradon:latest .
```

Run the Docker container:
Expand Down
3 changes: 1 addition & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
authors = [Author('Emilio Reyes', '[email protected]')]
summary = 'Pybuilder plugin for radon cyclomatic complexity'
url = 'https://github.com/soda480/pybuilder-radon'
version = '0.3.2'
version = '0.3.3'
default_task = [
'clean',
'analyze',
Expand Down Expand Up @@ -59,7 +59,6 @@ def set_properties(project):
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Build Tools'])
project.set_property('anybadge_exclude', 'vulnerabilities, coverage')
# only for functional testing plugin
# project.set_property('radon_break_build_average_complexity_threshold', 2.74)
# project.set_property('radon_break_build_complexity_threshold', 4)

0 comments on commit 89f22b8

Please sign in to comment.