feat(cli): control the information #929
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check-go-coverage | |
on: | |
pull_request: | |
branches: [master] | |
jobs: | |
coverage: | |
name: Check Go coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.20.x | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.x | |
- name: Run test metrics script | |
id: testcov | |
run: | | |
make test-coverage-report | tee test-results | |
echo "coverage=$(cat test-results | grep "Total coverage: " test-results | cut -d ":" -f 2 | bc)" >> $GITHUB_ENV | |
- name: Checks if Go coverage is at least 80% | |
if: env.coverage < 80 | |
run: | | |
echo "Go coverage is lower than 80%: ${{ env.coverage }}%" | |
exit 1 |