Skip to content

Commit ab90813

Browse files
committed
[Breaking Change] (config) Add a new input parameter 'test_type'.
1 parent f267ff3 commit ab90813

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/upload_code_report_to_codacy.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# Workflow input parameters:
77
# * General arguments:
88
# * download_path: The path to download testing coverage reports via 'actions/download-artifact@v3'.
9+
# * test_type: The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'.
910
#
1011
# * Secret arguments:
1112
# * codacy_token: The API token for uploading testing coverage report to Codacy.
@@ -22,8 +23,13 @@ on:
2223
inputs:
2324
download_path:
2425
description: "The path to download testing coverage reports via 'actions/download-artifact@v3'."
25-
required: true
2626
type: string
27+
required: false
28+
default: ./
29+
test_type:
30+
description: "The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'."
31+
type: string
32+
required: true
2733

2834
secrets:
2935
codacy_token:
@@ -42,7 +48,7 @@ jobs:
4248
path: ${{ inputs.download_path }}
4349

4450
- name: Generate testing report for Codacy
45-
run: mv ./coverage.xml ./cobertura.xml
51+
run: mv ./coverage_${{ inputs.test_type }}.xml ./cobertura.xml
4652

4753
- name: Upload testing report to Codacy
4854
uses: codacy/codacy-coverage-reporter-action@v1

0 commit comments

Comments
 (0)