mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Fixed path to coverage config file.
This commit is contained in:
8
.github/workflows/CoverageCollection.yml
vendored
8
.github/workflows/CoverageCollection.yml
vendored
@@ -35,13 +35,13 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
default: '-r tests/requirements.txt'
|
default: '-r tests/requirements.txt'
|
||||||
type: string
|
type: string
|
||||||
test_directory:
|
tests_directory:
|
||||||
description: 'Path to the directory containing tests (test working directory).'
|
description: 'Path to the directory containing tests (test working directory).'
|
||||||
required: false
|
required: false
|
||||||
default: 'tests'
|
default: 'tests'
|
||||||
type: string
|
type: string
|
||||||
unittest_directory:
|
unittest_directory:
|
||||||
description: 'Path to the directory containing unit tests (relative to test_directory).'
|
description: 'Path to the directory containing unit tests (relative to tests_directory).'
|
||||||
required: false
|
required: false
|
||||||
default: 'unit'
|
default: 'unit'
|
||||||
type: string
|
type: string
|
||||||
@@ -127,8 +127,8 @@ jobs:
|
|||||||
- name: Collect coverage
|
- name: Collect coverage
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
cd ${{ inputs.test_directory }}
|
cd ${{ inputs.tests_directory }}
|
||||||
[ 'x${{ inputs.coverage_config }}' != 'x' ] && PYCOV_ARGS='--cov-config=${{ inputs.coverage_config }}' || unset PYCOV_ARGS
|
[ '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
|
python -m pytest -rA --cov=. $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
|
||||||
|
|
||||||
- name: Convert to cobertura format
|
- name: Convert to cobertura format
|
||||||
|
|||||||
8
.github/workflows/UnitTesting.yml
vendored
8
.github/workflows/UnitTesting.yml
vendored
@@ -97,13 +97,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python }}
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
- name: 🔧 Install wheel and pip dependencies
|
- name: 🔧 Install wheel and pip dependencies (native)
|
||||||
if: matrix.system != 'msys2'
|
if: matrix.system != 'msys2'
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --disable-pip-version-check -U wheel
|
python -m pip install --disable-pip-version-check -U wheel
|
||||||
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
|
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
|
||||||
|
|
||||||
- name: 🔧 Install pip dependencies
|
- name: 🔧 Install pip dependencies (MSYS2)
|
||||||
if: matrix.system == 'msys2'
|
if: matrix.system == 'msys2'
|
||||||
run: |
|
run: |
|
||||||
if [ 'x${{ inputs.mingw_requirements }}' != 'x' ]; then
|
if [ 'x${{ inputs.mingw_requirements }}' != 'x' ]; then
|
||||||
@@ -112,14 +112,14 @@ jobs:
|
|||||||
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
|
python -m pip install --disable-pip-version-check ${{ inputs.requirements }}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: ☑ Run unit tests
|
- name: ☑ Run unit tests (Windows)
|
||||||
if: matrix.system == 'windows'
|
if: matrix.system == 'windows'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ inputs.tests_directory }}
|
cd ${{ inputs.tests_directory }}
|
||||||
$PYTEST_ARGS = if ("${{ inputs.artifact }}".length -gt 0) { "--junitxml=TestReportSummary.xml" } else { "" }
|
$PYTEST_ARGS = if ("${{ inputs.artifact }}".length -gt 0) { "--junitxml=TestReportSummary.xml" } else { "" }
|
||||||
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
||||||
|
|
||||||
- name: ☑ Run unit tests
|
- name: ☑ Run unit tests (Ubuntu/macOS)
|
||||||
if: matrix.system != 'windows'
|
if: matrix.system != 'windows'
|
||||||
run: |
|
run: |
|
||||||
cd ${{ inputs.tests_directory }}
|
cd ${{ inputs.tests_directory }}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
python-coverage:p
|
python-coverage:p
|
||||||
python-lxml:p
|
python-lxml:p
|
||||||
mingw_requirements: '-r tests/requirements.mingw.txt'
|
mingw_requirements: '-r tests/requirements.mingw.txt'
|
||||||
test_directory: 'tests'
|
tests_directory: 'tests'
|
||||||
unittest_directory: 'unit'
|
unittest_directory: 'unit'
|
||||||
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}
|
artifact: ${{ fromJson(needs.Params.outputs.params).artifacts.unittesting }}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
# Optional
|
# Optional
|
||||||
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
|
python_version: ${{ fromJson(needs.Params.outputs.params).python_version }}
|
||||||
requirements: '-r tests/requirements.txt'
|
requirements: '-r tests/requirements.txt'
|
||||||
test_directory: 'tests'
|
tests_directory: 'tests'
|
||||||
unittest_directory: 'unit'
|
unittest_directory: 'unit'
|
||||||
secrets:
|
secrets:
|
||||||
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ unittest_directory
|
|||||||
| unittest_directory | optional | string | ``unit`` |
|
| unittest_directory | optional | string | ``unit`` |
|
||||||
+--------------------+----------+----------+-----------+
|
+--------------------+----------+----------+-----------+
|
||||||
|
|
||||||
Path to the directory containing unit tests (relative to test_directory).
|
Path to the directory containing unit tests (relative to tests_directory).
|
||||||
|
|
||||||
|
|
||||||
coverage_config
|
coverage_config
|
||||||
|
|||||||
Reference in New Issue
Block a user