mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 11:06:56 +08:00
Split test directory and unit test directory into 2 parameters.
This commit is contained in:
12
.github/workflows/CoverageCollection.yml
vendored
12
.github/workflows/CoverageCollection.yml
vendored
@@ -35,10 +35,15 @@ on:
|
||||
required: false
|
||||
default: '-r tests/requirements.txt'
|
||||
type: string
|
||||
unittest_directory:
|
||||
description: 'Path to the directory containing unit tests.'
|
||||
test_directory:
|
||||
description: 'Path to the directory containing tests (test working directory).'
|
||||
required: false
|
||||
default: 'tests/unit'
|
||||
default: 'tests'
|
||||
type: string
|
||||
unittest_directory:
|
||||
description: 'Path to the directory containing unit tests (from test_directory).'
|
||||
required: false
|
||||
default: 'unit'
|
||||
type: string
|
||||
coverage_config:
|
||||
description: 'Path to the .coveragerc file. Use pyproject.toml by default.'
|
||||
@@ -117,6 +122,7 @@ jobs:
|
||||
- name: Collect coverage
|
||||
continue-on-error: true
|
||||
run: |
|
||||
cd ${{ inputs.test_directory }}
|
||||
[ 'x${{ inputs.coverage_config }}' != 'x' ] && PYCOV_ARGS='--cov-config=${{ inputs.coverage_config }}' || unset PYCOV_ARGS
|
||||
python -m pytest -rA --cov=. $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user