Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make codecov report to work on jobs re-run #5991

Merged
merged 3 commits into from Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/upload_coverage.sh
@@ -0,0 +1,14 @@
#!/bin/bash

REPORT_NAME=$1
EVENT_PAYLOAD_FILE=$2

PRID=`jq ".number + .check_run.pull_requests[0].number" $EVENT_PAYLOAD_FILE`
SHA=`jq -r ".pull_request.head.sha + .check_run.head_sha + .after" $EVENT_PAYLOAD_FILE`

if [ $PRID = "null" ]
then
bash <(curl -s https://codecov.io/bash) -n $REPORT_NAME -C $SHA
else
bash <(curl -s https://codecov.io/bash) -n $REPORT_NAME -C $SHA -P $PRID
fi
6 changes: 2 additions & 4 deletions .github/workflows/ci_accountability.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_admin.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_api.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_assemblies.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_blogs.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_budgets.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_comments.yml
Expand Up @@ -73,10 +73,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_conferences.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_consultations.yml
Expand Up @@ -68,10 +68,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_core.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_debates.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_forms.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_initiatives.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci_main.yml
Expand Up @@ -49,7 +49,3 @@ jobs:
name: Install JS deps
- run: bundle exec rspec
name: RSpec
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: main-folder
6 changes: 2 additions & 4 deletions .github/workflows/ci_meetings.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_pages.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_participatory_processes.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_proposals_system_admin.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rspec spec/system/admin
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: decidim-proposals-system-admin
- run: ./.github/upload_coverage.sh decidim-proposals-system-admin $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_proposals_system_public.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rspec spec/system/ --exclude-pattern 'spec/system/admin/**/*_spec.rb'
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: decidim-proposals-system-public
- run: ./.github/upload_coverage.sh decidim-proposals-system-public $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_proposals_unit_tests.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rspec --exclude-pattern 'spec/system/**/*_spec.rb'
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_sortitions.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH>
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_surveys.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH>
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_system.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci_verifications.yml
Expand Up @@ -65,10 +65,8 @@ jobs:
- run: bundle exec rake
name: RSpec
working-directory: ${{ env.DECIDIM_MODULE }}
- uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage.xml
name: ${{ env.DECIDIM_MODULE }}
- run: ./.github/upload_coverage.sh $DECIDIM_MODULE $GITHUB_EVENT_PATH
name: Upload coverage
- uses: actions/upload-artifact@v2-preview
if: always()
with:
Expand Down