Skip to content

Commit ba46b07

Browse files
committed
➕ Add one new parameter of the reusable workflow whether handles the test coverage report or not.
1 parent 42a533a commit ba46b07

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/rw_uv_run_test.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ on:
7575
type: string
7676
required: false
7777
default: '["ubuntu-latest", "ubuntu-22.04", "macos-latest", "macos-14"]'
78+
handle-coverage-report:
79+
description: "Enable to rename and upload pytest coverage reports."
80+
type: boolean
81+
required: false
82+
default: true
7883
secrets:
7984
e2e_test_api_token:
8085
description: "Set the API token for end-to-end test if it needs."
@@ -148,11 +153,13 @@ jobs:
148153
E2E_TEST_API_TOKEN: ${{ secrets.e2e_test_api_token }}
149154

150155
- name: Rename the code coverage result file
156+
if: ${{ inputs.handle-coverage-report }}
151157
working-directory: ${{ inputs.test_working_directory }}
152158
run: |
153159
mv ./.coverage ./.coverage.${{ inputs.test_type }}.${{ matrix.os }}-${{ matrix.python-version }}
154160
155161
- name: Upload code coverage result file
162+
if: ${{ inputs.handle-coverage-report }}
156163
uses: actions/upload-artifact@v5
157164
with:
158165
name: coverage_${{ inputs.test_type }}_${{ matrix.os }}_${{ matrix.python-version }}

0 commit comments

Comments
 (0)