-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
50 lines (49 loc) · 1.56 KB
/
action.yml
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
name: pytester-cov
author: programmingwithalex
description: >-
Recursively check pytest coverage and fail if file and/or total coverage below threshold.
branding:
color: 'gray-dark'
icon: 'check-circle'
inputs:
pytest-root-dir:
description: 'root directory to recursively search for .py files'
required: false
default: '.'
pytest-tests-dir:
description: 'directory with pytest tests. if left empty will identify test(s) dir by default'
required: false
default: ''
cov-omit-list:
description: 'list of directories and/or files to ignore'
required: false
default: ''
requirements-file:
description: 'requirements filepath for project'
required: false
default: 'requirements.txt'
cov-threshold-single:
description: 'fail if any single file coverage is less than threshold'
required: false
default: 0
cov-threshold-total:
description: 'fail if the total coverage is less than threshold'
required: false
default: 0
outputs:
output-table: # id of output
description: 'pytest-cover markdown output table'
cov-threshold-single-fail:
description: 'boolean if any single file coverage less than cov-threshold-single'
cov-threshold-total-fail:
description: 'boolean if total coverage less than cov-threshold-total'
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.pytest-root-dir }}
- ${{ inputs.pytest-tests-dir }}
- ${{ inputs.cov-omit-list }}
- ${{ inputs.requirements-file }}
- ${{ inputs.cov-threshold-single }}
- ${{ inputs.cov-threshold-total }}