Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit 70a8500

Browse files
authored
Enable running with coverage
1 parent 53bd724 commit 70a8500

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

action.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ inputs:
55
description: 'Directory of tests'
66
required: true
77
default: 'tests'
8+
coverage:
9+
description: 'Run with coverage'
10+
required: true
11+
default: false
812
runs:
913
using: "composite"
1014
steps:
1115
- shell: bash
1216
env:
1317
TESTS: "${{ inputs.tests }}"
18+
COVERAGE: "${{ inputs.coverage }}"
1419
run: |
1520
set -x
16-
python -m unittest discover -v "${TESTS}"
21+
if [ "x${COVERAGE}" != "x" ]; then
22+
COVERAGE="coverage -m"
23+
fi
24+
python -m ${COVERAGE} unittest discover -v "${TESTS}"

0 commit comments

Comments
 (0)