total not reported #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: reboundp (Python) | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Unittest Coverage Check | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies for testing | |
run: | | |
python -m pip install --upgrade pip | |
pip install numpy coverage | |
- name: Build package | |
run: pip install -e .[port] | |
- name: Test code coverage | |
run: | | |
cd tests/ | |
bash unittest_coverage.sh | |
- name: "Get total" | |
id: total | |
run: | | |
echo "total=$(coverage report --format=total)" | |
echo "total=$(coverage report --format=total)" >> $GITHUB_ENV | |
- name: Create Badge | |
uses: schneegans/dynamic-badges-action@v1.7.0 | |
with: | |
auth: ${{ secrets.GIST_BADGE_SECRET }} | |
gistID: 6807845416d284aea12220200073b4ed | |
filename: test.svg | |
label: Coverage | |
message: ${{ env.total }}% | |
minColorRange: 60 | |
maxColorRange: 100 | |
valColorRange: ${{ env.total }} | |