Commit 100e2ef committed Mar 12, 2025 · 6 / 6
1 parent 2398d58 commit 100e2ef Copy full SHA for 100e2ef
File tree 3 files changed +20
-24
lines changed
3 files changed +20
-24
lines changed Original file line number Diff line number Diff line change @@ -65,16 +65,27 @@ runs:
65
65
66
66
- name : ci/compare-coverage
67
67
if : env.IS_PR_WITH_CACHE == 'true'
68
+ id : compare-coverage
68
69
shell : bash
69
70
run : |
70
71
echo "::group::compare-coverage"
71
- ./scripts/compare-coverage.sh \
72
+ output=$( ./scripts/compare-coverage.sh \
72
73
./main-coverage \
73
74
./coverage \
74
75
${{ github.event.pull_request.number }} \
75
- ${{ inputs.github_token }}
76
+ ${{ inputs.github_token }})
77
+ echo "report<<EOF" >> $GITHUB_ENV
78
+ echo "$output" >> $GITHUB_ENV
79
+ echo "EOF" >> $GITHUB_ENV
76
80
echo "::endgroup::"
77
81
82
+ - name : Post coverage report
83
+ if : env.IS_PR_WITH_CACHE == 'true'
84
+ uses : thollander/actions-comment-pull-request@v3
85
+ with :
86
+ message : ${{ env.report }}
87
+ comment_tag : coverage-report
88
+
78
89
- name : ci/upload-coverage
79
90
if : github.ref_name == 'main'
80
91
id : upload-coverage
Original file line number Diff line number Diff line change @@ -17,18 +17,11 @@ jobs:
17
17
steps :
18
18
- name : ci/checkout-repo
19
19
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
-
21
- - name : Comment PR
22
- uses : thollander/actions-comment-pull-request@v3
20
+ - name : ci/test
21
+ uses : ./.github/actions/test
22
+ - name : ci/test-coverage
23
+ if : github.event_name == 'pull_request' || github.ref_name == 'main'
24
+ uses : ./.github/actions/test-coverage
23
25
with :
24
- message : |
25
- Hello world ! :wave:
26
-
27
- # - name: ci/test
28
- # uses: ./.github/actions/test
29
- # - name: ci/test-coverage
30
- # if: github.event_name == 'pull_request' || github.ref_name == 'main'
31
- # uses: ./.github/actions/test-coverage
32
- # with:
33
- # github_token: ${{ secrets.MM_MOBILE_GITHUB_TOKEN }}
34
- # run_id: ${{ github.run_id }}
26
+ github_token : ${{ secrets.MM_MOBILE_GITHUB_TOKEN }}
27
+ run_id : ${{ github.run_id }}
Original file line number Diff line number Diff line change @@ -63,14 +63,6 @@ if [ "$HAS_DECREASE" -eq 1 ]; then
63
63
COMMENT_BODY+=$' \n\n ' " ⚠️ **Warning:** One or more coverage metrics have decreased by more than ${COVERAGE_THRESHOLD} %"
64
64
fi
65
65
66
- if [ -n " $PR_NUMBER " ] && [ -n " $GITHUB_TOKEN " ]; then
67
- curl -X POST \
68
- -H " Authorization: token $GITHUB_TOKEN " \
69
- -H " Accept: application/vnd.github.v3+json" \
70
- " https://api.github.com/repos/$GITHUB_REPOSITORY /issues/$PR_NUMBER /comments" \
71
- -d " {\" body\" :$( echo " $COMMENT_BODY " | jq -R -s .) }"
72
- fi
73
-
74
66
echo " $COMMENT_BODY "
75
67
76
68
# Not failing the build for now
You can’t perform that action at this time.
0 commit comments