File tree Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 66env :
77 GIT_CONFIG_GLOBAL : " /root/.gitconfig" # fix path in container (https://github.com/actions/runner/issues/2033)
88
9+ defaults :
10+ run :
11+ shell : " bash"
12+
913jobs :
1014
1115 # ## LINT ###
@@ -47,14 +51,16 @@ jobs:
4751 - uses : " actions/checkout@v4"
4852
4953 - name : " Measuring test coverage"
50- run : " make test/cover"
51-
52- - name : " Upload coverage to Coveralls"
53- uses : " coverallsapp/github-action@v2"
54- with :
55- github-token : ${{ secrets.GITHUB_TOKEN }}
56- file : " coverage.out"
57- format : " golang"
54+ run : " make test/cover | tee coverage.log; exit ${PIPESTATUS[0]}"
55+
56+ - name : " Upload coverage to badge"
57+ if : " ${{ github.ref_name == github.event.repository.default_branch }}"
58+ env :
59+ BADGEN_TOKEN : ${{ secrets.BADGEN_TOKEN }}
60+ run : |
61+ RESULT=$(grep -E 'total:\s+\(statements\)\s+[0-9]+\.[0-9]+%' coverage.log | grep -Eo '[0-9]+\.[0-9]+%' | sed 's/%/%25/g')
62+ curl -LX PUT --header "Authorization: Bearer ${BADGEN_TOKEN}" \
63+ "https://badgen.net/memo/tarantool-sdvg-coverage-master/coverage/${RESULT}/green"
5864
5965 # ## PERFORMANCE ###
6066
Original file line number Diff line number Diff line change 1616[ pre-release-badge ] : https://badgen.net/static/pre-release/latest/orange?color=purple
1717[ pre-release-url ] : https://github.com/tarantool/sdvg/releases/tag/latest/
1818[ actions-badge ] : https://badgen.net/github/checks/tarantool/sdvg/master
19- [ actions-url ] : https://github.com/tarantool/sdvg/actions
20- [ test-coverage-badge ] : https://badgen.net/coveralls/c/github/ tarantool/ sdvg/ master
21- [ test-coverage-url ] : https://coveralls.io/github/ tarantool/sdvg?branch=master
19+ [ actions-url ] : https://github.com/tarantool/sdvg/actions?query=branch%3Amaster
20+ [ test-coverage-badge ] : https://badgen.net/memo/ tarantool- sdvg-coverage- master
21+ [ test-coverage-url ] : https://github.com/ tarantool/sdvg/actions?query=branch%3Amaster
2222[ language-badge ] : https://badgen.net/static/language/go/blue
2323[ language-url ] : https://github.com/tarantool/sdvg/search?l=go
2424[ license-badge ] : https://badgen.net/github/license/tarantool/sdvg?color=cyan
Original file line number Diff line number Diff line change 1616[ pre-release-badge ] : https://badgen.net/static/pre-release/latest/orange?color=purple
1717[ pre-release-url ] : https://github.com/tarantool/sdvg/releases/tag/latest/
1818[ actions-badge ] : https://badgen.net/github/checks/tarantool/sdvg/master
19- [ actions-url ] : https://github.com/tarantool/sdvg/actions
20- [ test-coverage-badge ] : https://badgen.net/coveralls/c/github/ tarantool/ sdvg/ master
21- [ test-coverage-url ] : https://coveralls.io/github/ tarantool/sdvg?branch=master
19+ [ actions-url ] : https://github.com/tarantool/sdvg/actions?query=branch%3Amaster
20+ [ test-coverage-badge ] : https://badgen.net/memo/ tarantool- sdvg-coverage- master
21+ [ test-coverage-url ] : https://github.com/ tarantool/sdvg/actions?query=branch%3Amaster
2222[ language-badge ] : https://badgen.net/static/language/go/blue
2323[ language-url ] : https://github.com/tarantool/sdvg/search?l=go
2424[ license-badge ] : https://badgen.net/github/license/tarantool/sdvg?color=cyan
You can’t perform that action at this time.
0 commit comments