Github actions, automated testing and coverage reports. #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: Python CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip install -e . | |
- name: Run tests with coverage | |
run: | | |
pytest --cov=roll_sim --cov-report xml:cov.xml --junitxml=res.xml | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: always() | |
with: | |
files: | | |
res.xml | |
- name: Coverage report | |
uses: 5monkeys/cobertura-action@master | |
with: | |
path: cov.xml | |
minimum_coverage: 66 |