Closed drdanz closed 3 years ago
Internal ticket created : CY-3463
Hi @drdanz
For this kind of use case, we suggest using the script directly. In this case, you described, you could something like:
name: codacy-coverage-reporter
on: ["push"]
jobs:
job1:
runs-on: ubuntu-latest
name: build1
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
# [...]
- name: Run codacy-coverage-reporter
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
job2:
runs-on: ubuntu-latest
name: build2
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
# [...]
- name: Run codacy-coverage-reporter
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r cobertura.xml -t ${{ secrets.CODACY_PROJECT_TOKEN }} --partial
finalize-coverage-report:
runs-on: ubuntu-latest
name: finalize-coverage-report
needs: [job1, job2]
steps:
- name: Run codacy-coverage-reporter
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final -t ${{ secrets.CODACY_PROJECT_TOKEN }}
It's likely an easy change in your workflow. The main idea behind the action is to cover the most common use case, and for these different ones, we suggest using the coverage script directly.
Let us know if this helped you
This was just a suggestion, I think it would just be nicer and less error prone to have an action to do that... Anyway the coverage script works, thanks!
Anyway the coverage script works, thanks!
Nice!
This was just a suggestion, I think it would just be nicer and less error prone to have an action to do that...
We appreciate the feedback and feel free to keep it coming 👍 . This feedback will be taken into account when planning future work here. Thanks.
Meanwhile, I'll close this issue. Since you have a solution
In order to send coverage from more than one of the github jobs, it would be useful to have some option to specify to run only the "partial" or only the "final" step. For example something like this: