Skip to content

debugging workflow

debugging workflow #5

name: Python Test and Coverage
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: "3.9"
# Optional - x64 or x86 architecture, defaults to x64
architecture: "x64"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest pytest-cov
- name: Git submodule initialization
run: |
git submodule update --init --recursive
- name: Run pytest with coverage
run: |
python3 -m coverage run -m pytest tests --junitxml=report.xml; coverage report -i --include=src/*
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }} # Not required for public repos
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true