Github actions, automated testing and coverage reports. #1
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 | |
coverage run -m pytest | |
coverage report | |
coverage xml | |
- name: Display test results and coverage | |
run: | | |
cat pytest-report.xml | |
cat coverage.xml |