mirror of
https://github.com/pyTooling/Actions.git
synced 2026-02-12 02:56:56 +08:00
Adding or operator in Action variable expansions.
This commit is contained in:
6
.github/workflows/CoverageCollection.yml
vendored
6
.github/workflows/CoverageCollection.yml
vendored
@@ -132,17 +132,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export ENVIRONMENT_NAME="Linux (x86-64)"
|
export ENVIRONMENT_NAME="Linux (x86-64)"
|
||||||
ABSDIR=$(pwd)
|
ABSDIR=$(pwd)
|
||||||
[ -n '${{ inputs.tests_directory }}' ] && 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
|
||||||
echo "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes"
|
echo "python -m pytest -rA --cov=${ABSDIR} ${PYCOV_ARGS} ${{ inputs.unittest_directory }} --color=yes"
|
||||||
python -m pytest -rA --cov=${ABSDIR} $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
|
python -m pytest -rA --cov=${ABSDIR} $PYCOV_ARGS ${{ inputs.unittest_directory }} --color=yes
|
||||||
|
|
||||||
- name: Convert to cobertura format
|
- name: Convert to cobertura format
|
||||||
run: coverage xml --data-file=${{ inputs.tests_directory }}/.coverage
|
run: coverage xml --data-file=${{ inputs.tests_directory || '.' }}/.coverage
|
||||||
|
|
||||||
- name: Convert to HTML format
|
- name: Convert to HTML format
|
||||||
run: |
|
run: |
|
||||||
coverage html --data-file=${{ inputs.tests_directory }}/.coverage -d ${{ steps.getVariables.outputs.coverage_report_html_directory }}
|
coverage html --data-file=${{ inputs.tests_directory || '.' }}/.coverage -d ${{ steps.getVariables.outputs.coverage_report_html_directory }}
|
||||||
rm ${{ steps.getVariables.outputs.coverage_report_html_directory }}/.gitignore
|
rm ${{ steps.getVariables.outputs.coverage_report_html_directory }}/.gitignore
|
||||||
|
|
||||||
- name: 📤 Upload 'Coverage Report' artifact
|
- name: 📤 Upload 'Coverage Report' artifact
|
||||||
|
|||||||
6
.github/workflows/UnitTesting.yml
vendored
6
.github/workflows/UnitTesting.yml
vendored
@@ -192,7 +192,7 @@ jobs:
|
|||||||
if: matrix.system == 'windows'
|
if: matrix.system == 'windows'
|
||||||
run: |
|
run: |
|
||||||
$env:ENVIRONMENT_NAME = "${{ matrix.envname }}"
|
$env:ENVIRONMENT_NAME = "${{ matrix.envname }}"
|
||||||
if ("${{ inputs.tests_directory }}") { 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
|
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
export ENVIRONMENT_NAME="${{ matrix.envname }}"
|
export ENVIRONMENT_NAME="${{ matrix.envname }}"
|
||||||
ABSDIR=$(pwd)
|
ABSDIR=$(pwd)
|
||||||
[ -n '${{ inputs.tests_directory }}' ] && 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
|
python -m pytest -rA ${{ inputs.unittest_directory }} $PYTEST_ARGS --color=yes
|
||||||
@@ -211,6 +211,6 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifact }}-${{ matrix.system }}-${{ matrix.python }}
|
name: ${{ inputs.artifact }}-${{ matrix.system }}-${{ matrix.python }}
|
||||||
path: ${{ inputs.tests_directory }}/TestReportSummary.xml
|
path: ${{ inputs.tests_directory || '.' }}/TestReportSummary.xml
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|||||||
Reference in New Issue
Block a user