Skip to content

[Sync Iteration] python/wordy/5 #55

[Sync Iteration] python/wordy/5

[Sync Iteration] python/wordy/5 #55

Workflow file for this run

---
name: Codecov Coverage Report
on: # yamllint disable-line rule:truthy
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
run:
runs-on: ${{ matrix.os }}
# Adding 'timeout-minutes: 10' would prevent jobs from running
# indefinitely if something goes wrong
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: "Cache PIP Dependencies"
uses: "actions/cache@v4"
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install prerequisites
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Install pytest, pytest-cov
run: |
pip install pytest
pip install pytest-cov
- name: Generate coverage report
# yamllint disable rule:line-length
run: |
python -c "import os; print(os.getcwd())"
python -m pytest . --ignore=solutions --log-cli-level=INFO -v --cov-report term-missing --cov --cov-branch --cov-report=xml
- name: List test files
run: |
ls *.xml
# yamllint enable rule:line-length
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)cd
flags: unittests # optional
name: codecov-umbrella # optional