KaaS Image creation #315
Workflow file for this run
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: Code Coverage Evaluation on PR | |
on: | |
push: | |
branches: | |
- develop | |
- develop_* | |
paths: | |
- 'src/**' | |
pull_request: | |
branches: | |
- develop | |
- develop_* | |
paths: | |
- 'src/**' | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
codecov: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Kestrel | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install . | |
- name: Coverage report generation | |
run: | | |
python -m pip install pytest-cov | |
# pytest-cov does not support automatic sub-package recognition in src/ | |
# pass in all sub-package names through multiple --cov arguments | |
# use ls, xargs, and sed carefully regarding diff between mac/BSD and linux | |
python -m pytest -vv --cov-report=xml $(ls src | grep -v '.egg-info' | xargs | sed -r 's/^| / --cov=/g') | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
fail_ci_if_error: true | |
verbose: true |