Update run-unittests.yml #3
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 Unit Tests and Coverage | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
test: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
python-version: [3.10] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.10 # ${{ matrix.python-version }} | |
- name: Install pip | |
run: | | |
python -m ensurepip --upgrade | |
python -m pip install --upgrade pip | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Run unit tests | |
run: pytest | |
- name: Generate coverage report | |
run: coverage run -m pytest | |
- name: Print coverage report | |
run: coverage report |