-
Notifications
You must be signed in to change notification settings - Fork 13
64 lines (53 loc) · 1.62 KB
/
_codecov.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# -*- mode: yaml; coding: utf-8 -*-
#
# Copyright (C) 2023 Benjamin Thomas Schwertfeger
# All rights reserved.
# https://github.com/btschwertfeger
#
# Template workflow to build the project for a specific os
# and Python version, run the tests and upload the results to codecov.
#
name: CodeCov
on:
workflow_call:
inputs:
os:
type: string
required: true
python-version:
type: string
required: true
permissions: read-all
concurrency:
group: codecov-${{ github.ref }}
cancel-in-progress: true
jobs:
codecov:
name: Coverage
runs-on: ${{ inputs.os }}
env:
OS: ${{ inputs.os }}
PYTHON: ${{ inputs.python-version }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
with:
python-version: ${{ inputs.python-version }}
- name: Install dependencies
run: python -m pip install --upgrade pip
- name: Install package
run: python -m pip install ".[dev,test]"
- name: Generate coverage report
run: pytest --retries 1 --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 #v5.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true