3737 description : " The testing type. In generally, it only has 2 options: 'unit-test' and 'integration-test'."
3838 required : true
3939 type : string
40- test_os :
41- description : " The OS runtime environment in. If it has multiple values, please separate it by comma ','. In generally, it
42- only has 2 options: 'macos' and 'ubuntu'."
43- required : true
44- type : string
4540 upload-to-codecov :
4641 description : " If it's true, it would upload testing coverage report for Codecov (https://codecov.io)."
4742 type : boolean
@@ -129,24 +124,12 @@ jobs:
129124 if : ${{ inputs.upload-to-codecov == true }}
130125 run : pip3 install codecov
131126
132- - name : Upload coverage report to Codecov https://codecov.io (For Unit-Test or Integration-Test)
133- if : ${{ inputs.upload-to-codecov == true && (inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test') }}
134- run : |
135- codecov \
136- -t ${{ secrets.codecov_token }} \
137- --file coverage_${{ inputs.test_type }}_${{ inputs.test_os }}.xml \
138- --flags ${{ inputs.codecov_flags }} \
139- --env OS,PYTHON \
140- --name ${{ inputs.codecov_name }} \
141- --required \
142- --verbose
143-
144- - name : Upload coverage report to Codecov https://codecov.io (For all test types)
145- if : ${{ inputs.upload-to-codecov == true && inputs.test_type == 'all-test' }}
127+ - name : Upload coverage report to Codecov https://codecov.io
128+ if : ${{ inputs.upload-to-codecov == true }}
146129 run : |
147130 codecov \
148131 -t ${{ secrets.codecov_token }} \
149- --file coverage .xml \
132+ --file coverage_${{ inputs.test_type }} .xml \
150133 --flags ${{ inputs.codecov_flags }} \
151134 --env OS,PYTHON \
152135 --name ${{ inputs.codecov_name }} \
@@ -163,18 +146,10 @@ jobs:
163146 GITHUB_TOKEN : ${{ secrets.coveralls_token }}
164147 run : coveralls --verbose
165148
166- - name : Upload testing report to Codacy https://app.codacy.com/ (For Unit-Test or Integration-Test)
167- if : ${{ inputs.upload-to-codacy == true && (inputs.test_type == 'unit-test' || inputs.test_type == 'integration-test') }}
168- uses : codacy/codacy-coverage-reporter-action@v1
169- with :
170- project-token : ${{ secrets.codacy_token }}
171- coverage-reports : coverage_${{ inputs.test_type }}_${{ inputs.test_os }}.xml
172- # coverage-reports: cobertura.xml
173-
174- - name : Upload testing report to Codacy https://app.codacy.com/ (For all test types)
175- if : ${{ inputs.upload-to-codacy == true && inputs.test_type == 'all-test' }}
149+ - name : Upload testing report to Codacy https://app.codacy.com/
150+ if : ${{ inputs.upload-to-codacy == true }}
176151 uses : codacy/codacy-coverage-reporter-action@v1
177152 with :
178153 project-token : ${{ secrets.codacy_token }}
179- coverage-reports : coverage .xml
154+ coverage-reports : coverage_${{ inputs.test_type }} .xml
180155# coverage-reports: cobertura.xml
0 commit comments