Skip to content

Commit 3ed42c4

Browse files
committed
Join coverage workflow with a new one
1 parent bd7fa94 commit 3ed42c4

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

.github/workflows/code-coverage-upload.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/pr-compliance-check.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request_target:
55
workflow_run:
66
workflows: ['Run tests for PR']
7+
types: [completed]
78

89
concurrency:
910
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.workflow_run.pull_requests[0].number }}
@@ -56,4 +57,26 @@ jobs:
5657
run-mode: ci
5758
dangerfile: Dangerfile.df.kts
5859
env:
59-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
upload-coverage:
62+
runs-on: ubuntu-latest
63+
if: github.event.workflow_run.actor.name != 'dependabot[bot]' && github.repository == 'OptimumCode/json-schema-validator' && github.event.workflow_run.conclusion == 'success'
64+
steps:
65+
- name: 'Checkout Repository'
66+
uses: actions/checkout@v4
67+
with:
68+
repository: ${{ github.event.workflow_run.head_repository.full_name }}
69+
ref: ${{ github.event.workflow_run.head_sha }}
70+
- name: Download benchmark results
71+
uses: dawidd6/action-download-artifact@v6
72+
with:
73+
name: coverage-reports
74+
path: reports/
75+
run_id: ${{ github.event.workflow_run.id }}
76+
- name: Upload coverage reports to Codecov
77+
uses: codecov/codecov-action@v4
78+
with:
79+
override_branch: ${{ github.event.workflow_run.pull_requests[0].head.ref }}
80+
override_commit: ${{ github.event.workflow_run.pull_requests[0].head.sha }}
81+
override_pr: ${{ github.event.workflow_run.pull_requests[0].number }}
82+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)