docs: Add test and coverage badges #22
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: Test Core | |
on: [push] | |
jobs: | |
test-core: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: cd core && python -m pip install -r requirements.txt | |
- name: Test with pytest | |
run: cd core && pytest --log-cli-level=INFO | |
# TODO: Only prepare code coverage data if on the master branch | |
- name: Prepare code coverage data | |
run: pytest --cov core | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |