Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 0 additions & 64 deletions .github/workflows/_codecov.yaml

This file was deleted.

27 changes: 25 additions & 2 deletions .github/workflows/_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to run the unit tests of the package
# Template workflow to run the unit tests of the package and upload the
# coverage report of the ubuntu-latest/3.11 matrix cell to Codecov.
#

name: Test Spot
Expand All @@ -18,13 +19,19 @@ on:
python-version:
type: string
required: true
secrets:
CODECOV_TOKEN:
required: false

permissions: read-all

jobs:
Test:
name: Test ${{ inputs.os }} ${{ inputs.python-version }}
runs-on: ${{ inputs.os }}
env:
OS: ${{ inputs.os }}
PYTHON: ${{ inputs.python-version }}
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
Expand All @@ -41,4 +48,20 @@ jobs:
run: python -m pip install --user . -r requirements-dev.txt

- name: Run unit tests
run: pytest -vv --retries 1 -n auto tests
run: pytest -vv --retries 1 -n auto --cov --cov-report=xml tests

- name: Upload coverage to Codecov
if: |
inputs.os == 'ubuntu-latest'
&& inputs.python-version == '3.11'
&& github.actor == 'btschwertfeger'
&& (github.event_name == 'push' || github.event_name == 'release')
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
18 changes: 4 additions & 14 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
os: ubuntu-latest
python-version: "3.11"

## Run the unit tests for Python 3.8 until 3.11
## Run the unit tests for Python 3.9 until 3.14 and upload the
## coverage statistics to codecov
##
Test:
needs: [Pre-Commit]
Expand All @@ -71,19 +72,8 @@ jobs:
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

## Generates and uploads the coverage statistics to codecov
##
CodeCov:
if: |
(success() && github.actor == 'btschwertfeger')
&& (github.event_name == 'push' || github.event_name == 'release')
needs: [Pre-Commit]
uses: ./.github/workflows/_codecov.yaml
with:
os: ubuntu-latest
python-version: "3.11"
secrets: inherit
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

## Uploads the package to test.pypi.org on master if triggered by
## a regular commit/push.
Expand Down