Feature bhushan1 #24
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
unit-tests: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Environment | |
run: | | |
chmod +x ./.github/workflows/setup.sh && ./.github/workflows/setup.sh | |
pip install pytest pytest-cov | |
- name: Test with pytest | |
run: | | |
pytest --doctest-modules --junitxml=junit/test-results.xml --cov=hw2_debugging --cov-report=xml --cov-report=html | |
- name: Upload coverage to Codecov | |
if: always() | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |