Create CITATION.cff #226
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 Tests | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install -e . | |
# Install coverage package to generate coverage reports | |
pip install coverage codecov | |
- name: Run tests with coverage | |
run: | | |
# Use coverage run instead of python -m unittest discover to run your tests | |
coverage run -m unittest discover tests | |
# Generate a coverage report | |
coverage report | |
# Optionally, generate an XML report for Codecov | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
# Token is not required for public repos | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true # Optional: specify if CI should fail if Codecov encounters errors |