Update README.md #10
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/ | |
pip uninstall --y urllib3 rebound | |
coverage run -m -a unittest test_environment/test_features_base.py -v | |
pip install 'rebound<4.0.0' | |
coverage run -m -a unittest test_environment/test_features_rebound3.py -v | |
pip uninstall --y rebound | |
pip install urllib3 'rebound>=4.0.0' | |
coverage run -m -a unittest discover -s . -v | |
coverage run -m -a unittest test_environment/test_features_port.py -v | |
coverage html -d coverage_report | |
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 }} | |