Skip to content

Commit 3c43312

Browse files
committed
Update gocovdiff
1 parent 59b7ec4 commit 3c43312

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

templates/github/workflows/test-integration.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ jobs:
8585
id: annotate
8686
if: github.event.pull_request.base.sha != ''
8787
run: |
88+
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.3.6/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
89+
gocovdiff_hash=$(git hash-object ./gocovdiff)
90+
[ "$gocovdiff_hash" == "8e507e0d671d4d6dfb3612309b72b163492f28eb" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
8891
git fetch origin master ${{ github.event.pull_request.base.sha }}
89-
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.3.4/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && shasum -a 256 gocovdiff && echo "b351c67526eefeb0671c82e9271ae984875865eed19e911f40f78348cb98347c gocovdiff" | shasum -c
9092
REP=$(./gocovdiff -cov integration.coverprofile -gha-annotations gha-integration.txt -delta-cov-file delta-cov-integration.txt -target-delta-cov ${TARGET_DELTA_COV})
9193
echo "${REP}"
9294
REP="${REP//$'\n'/%0A}"

templates/github/workflows/test-unit.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ jobs:
8888
id: annotate
8989
if: matrix.go-version == env.COV_GO_VERSION && github.event.pull_request.base.sha != ''
9090
run: |
91+
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.3.6/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
92+
gocovdiff_hash=$(git hash-object ./gocovdiff)
93+
[ "$gocovdiff_hash" == "8e507e0d671d4d6dfb3612309b72b163492f28eb" ] || (echo "::error::unexpected hash for gocovdiff, possible tampering: $gocovdiff_hash" && exit 1)
9194
git fetch origin master ${{ github.event.pull_request.base.sha }}
92-
curl -sLO https://github.com/vearutop/gocovdiff/releases/download/v1.3.4/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && shasum -a 256 gocovdiff && echo "b351c67526eefeb0671c82e9271ae984875865eed19e911f40f78348cb98347c gocovdiff" | shasum -c
9395
REP=$(./gocovdiff -cov unit.coverprofile -gha-annotations gha-unit.txt -delta-cov-file delta-cov-unit.txt -target-delta-cov ${TARGET_DELTA_COV})
9496
echo "${REP}"
9597
REP="${REP//$'\n'/%0A}"

0 commit comments

Comments
 (0)