Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Merge from master

Merge from master #924

Workflow file for this run

---
name: Codecov Coverage Report
on: # yamllint disable-line rule:truthy
push:
branches-ignore:
- main
- master
- kyu2
- kyu3
- kyu4
- kyu5
- kyu6
- kyu7
- kyu8
- utils
- Documentation
pull_request_target:
branches:
- 'none'
types:
- opened
- edited
- synchronize
- reopened
# Why is Codecov upload step in GitHub Actions not finding the token?
# https://stackoverflow.com/questions/78298827/why-is-codecov-upload-step-in-github-actions-not-finding-the-token
workflow_call:
secrets:
codecov_token:
required: true
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-24.04']
steps:
- uses: actions/checkout@main
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: "3.12"
check-latest: true
- run: python --version
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
python -m pip install --upgrade wheel
python -m pip install --no-cache-dir -r requirements.txt --upgrade
- name: Install pytest, pytest-cov
run: |
python -m pip install pytest
python -m pip install pytest-cov
- name: Check pytest, pytest-cov version
run: |
python -m pytest --version
- name: Generate coverage report
# You must now upload using a token.
# https://app.codecov.io/gh/iKostanOrg/codewars/tests/new
# yamllint disable rule:line-length
run: |
python -m pytest . -v --cov-report term-missing --cov-report=xml --cov=./ --junitxml=junit.xml -o junit_family=legacy --debug
# yamllint enable rule:line-length
- name: List test files
run: |
ls *.xml
# Codecov GitHub Action
# https://github.com/marketplace/actions/codecov
- name: Upload test results to Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true # optional (default = false)
files: ./coverage.xml,./junit.xml # optional
flags: unittests # optional
name: codecov-umbrella # optional
verbose: true # optional (default = false)
env:
CODECOV_TOKEN: ${{ secrets.codecov_token }}