-
Notifications
You must be signed in to change notification settings - Fork 14
64 lines (53 loc) · 1.64 KB
/
_codecov.yaml
File metadata and controls
64 lines (53 loc) · 1.64 KB
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.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 . -r requirements-dev.txt
- name: Generate coverage report
run: pytest --retries 1 -n auto --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de #v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true