mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Also fixed code coverage.
This commit is contained in:
1
.github/workflows/CoverageCollection.yml
vendored
1
.github/workflows/CoverageCollection.yml
vendored
@@ -131,6 +131,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
export ENVIRONMENT_NAME="Linux (x86-64)"
|
export ENVIRONMENT_NAME="Linux (x86-64)"
|
||||||
|
export PYTHONPATH=$(pwd)
|
||||||
ABSDIR=$(pwd)
|
ABSDIR=$(pwd)
|
||||||
cd "${{ inputs.tests_directory || '.' }}"
|
cd "${{ inputs.tests_directory || '.' }}"
|
||||||
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
|
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
|
||||||
|
|||||||
6
.github/workflows/UnitTesting.yml
vendored
6
.github/workflows/UnitTesting.yml
vendored
@@ -195,7 +195,8 @@ jobs:
|
|||||||
$env:PYTHONPATH = (Get-Location).ToString()
|
$env:PYTHONPATH = (Get-Location).ToString()
|
||||||
cd "${{ inputs.tests_directory || '.' }}"
|
cd "${{ inputs.tests_directory || '.' }}"
|
||||||
$PYTEST_ARGS = if ("${{ inputs.artifact }}") { "--junitxml=TestReportSummary.xml" } else { "" }
|
$PYTEST_ARGS = if ("${{ inputs.artifact }}") { "--junitxml=TestReportSummary.xml" } else { "" }
|
||||||
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
Write-Host "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}"
|
||||||
|
python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}
|
||||||
|
|
||||||
- name: ☑ Run unit tests (Ubuntu/macOS)
|
- name: ☑ Run unit tests (Ubuntu/macOS)
|
||||||
if: matrix.system != 'windows'
|
if: matrix.system != 'windows'
|
||||||
@@ -206,7 +207,8 @@ jobs:
|
|||||||
cd "${{ inputs.tests_directory || '.' }}"
|
cd "${{ inputs.tests_directory || '.' }}"
|
||||||
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
|
[ -n '${{ inputs.coverage_config }}' ] && PYCOV_ARGS="--cov-config=${ABSDIR}/${{ inputs.coverage_config }}" || unset PYCOV_ARGS
|
||||||
[ -n '${{ inputs.artifact }}' ] && PYTEST_ARGS='--junitxml=TestReportSummary.xml' || unset PYTEST_ARGS
|
[ -n '${{ inputs.artifact }}' ] && PYTEST_ARGS='--junitxml=TestReportSummary.xml' || unset PYTEST_ARGS
|
||||||
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
echo "python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}"
|
||||||
|
python -m pytest -rA $PYTEST_ARGS --color=yes ${{ inputs.unittest_directory }}
|
||||||
|
|
||||||
- name: 📤 Upload 'TestReportSummary.xml' artifact
|
- name: 📤 Upload 'TestReportSummary.xml' artifact
|
||||||
if: inputs.artifact != ''
|
if: inputs.artifact != ''
|
||||||
|
|||||||
Reference in New Issue
Block a user