[pre-commit.ci] pre-commit autoupdate #6
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 | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install python3 python3-pip -y | |
pip3 install pytest pytest-cov codecov | |
- name: Run tests | |
run: | | |
pytest --verbose --cov-report term-missing --cov=pitopd | |
coverage xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage.xml | |
flags: python-tests | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |