Unit Test With Coverage #54
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: Unit Test With Coverage | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_run: | |
workflows: ["Unit Test"] | |
types: | |
- completed | |
permissions: | |
contents: read | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python V3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
make devtools | |
- name: Run Unit Tests with Coverage | |
run: | | |
coverage run -m unittest discover tests | |
coverage report | |
coverage xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage.xml |