forked from openvinotoolkit/nncf
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 2.18 KB
/
post_pr_merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# With the squash-and-merge strategy that we are employing, the final commit that ends up in the develop branch
# after the PR merge has a brand-new commit SHA that is not equal to the SHA of the last commit in the PR.
# This means that the coverage reports uploaded to Codecov in the course of the (yet unmerged) PR checks will not
# be translated to the ultimate commit in the develop and Codecov will show "missing base report" errors in the UI.
# We don't want to re-run the precommits after PR merge via a separate 'on: push' action on the develop branch, so
# instead will grab the latest coverage report artifact from the just-merged PR and upload it as the report for the
# new commit on develop. Note that this will break if the PR is merged before the coverage artifact for the latest
# PR commit is generated.
name: Post-PR merge actions
on:
pull_request_target:
branches:
- develop
types:
- closed
jobs:
upload-coverage-common:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_common
coverage_flags: COMMON
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-onnx:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_onnx
coverage_flags: ONNX
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
upload-coverage-openvino:
if: github.event.pull_request.merged == true
uses: ./.github/workflows/upload_coverage_for_develop.yml
with:
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
last_sha_in_pr: ${{ github.event.pull_request.head.sha }}
coverage_artifact_name_in_pr: coverage_openvino
coverage_flags: OPENVINO
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}