Skip to content

Commit 93e325a

Browse files
committed
➕ Add new parameter of reusable workflow about working directory in organizing test coverage reports process.
1 parent 7ca6956 commit 93e325a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/rw_upload_test_cov_report.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# * General arguments:
88
# * download_path: The path to download testing coverage reports via 'actions/download-artifact@v3'.
99
# * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'.
10+
# * test_working_directory: The working directory for test running.
1011
# * upload-to-codecov: If it's true, it would upload testing coverage report for Codecov (https://codecov.io).
1112
# * codecov_flags: The flags of the testing coverage report for Codecov. This option would be required if 'upload-to-codecov' is true.
1213
# * codecov_name: The name of the testing coverage report for Codecov. This option would be required if 'upload-to-codecov' is true.
@@ -37,6 +38,11 @@ on:
3738
description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'."
3839
required: true
3940
type: string
41+
test_working_directory:
42+
description: "The working directory for test running."
43+
required: false
44+
type: string
45+
default: './'
4046
upload-to-codecov:
4147
description: "If it's true, it would upload testing coverage report for Codecov (https://codecov.io)."
4248
type: boolean
@@ -156,6 +162,7 @@ jobs:
156162

157163
- name: Upload coverage report to Coveralls https://coveralls.io
158164
if: ${{ inputs.upload-to-coveralls == true }}
165+
working-directory: ${{ inputs.test_working_directory }}
159166
env:
160167
GITHUB_TOKEN: ${{ secrets.coveralls_token }}
161168
run: coveralls --verbose

0 commit comments

Comments
 (0)