@@ -22,14 +22,10 @@ jobs:
2222 env :
2323 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed for GitHub badge storer integration test
2424 run : make test
25-
26- - name : early return
27- if : runner.os != 'Linux'
28- run : |
29- exit 0
30-
25+
3126 - name : check test coverage
3227 id : coverage
28+ if : runner.os == 'Linux'
3329 uses : vladopajic/go-test-coverage@v2
3430 with :
3531 config : ./.github/.testcoverage.yml
3834
3935 # Post coverage report as comment
4036 - name : find pull request ID
37+ if : runner.os == 'Linux'
4138 run : |
4239 PR_DATA=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
4340 "https://api.github.com/repos/${{ github.repository }}/pulls?head=${{ github.repository_owner }}:${{ github.ref_name }}&state=open")
@@ -49,15 +46,15 @@ jobs:
4946 echo "No open pull request found for this branch."
5047 fi
5148 - name : find if coverage report is already present
52- if : env.pull_request_id
49+ if : env.pull_request_id && runner.os == 'Linux'
5350 uses : peter-evans/find-comment@v3
5451 id : fc
5552 with :
5653 issue-number : ${{ env.pull_request_id }}
5754 comment-author : ' github-actions[bot]'
5855 body-includes : ' go-test-coverage report:'
5956 - name : post coverage report
60- if : env.pull_request_id
57+ if : env.pull_request_id && runner.os == 'Linux'
6158 uses : peter-evans/create-or-update-comment@v4
6259 with :
6360 token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments