feat(critical): add critical severity to KICS CLI #1759
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: generate-coverage | |
runs-on: ubuntu-latest | |
outputs: | |
coverage: ${{ steps.testcov.outputs.coverage }} | |
color: ${{ steps.testcov.outputs.color }} | |
steps: | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go 1.22.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.x | |
- name: Run test metrics script | |
id: testcov | |
run: | | |
make test-coverage-report | tee test-results | |
TOTAL_TESTS=$(cat test-results | grep -v TestQueriesContent/ | grep -v TestQueriesMetadata/ | grep -v TestQueries/ | grep PASS | wc -l) | |
echo "Total number of tests :: ${TOTAL_TESTS}" | |
echo "::set-output name=total_tests::${TOTAL_TESTS}" | |
- name: Checks if Go coverage is at least 74% | |
if: steps.testcov.outputs.coverage < 74 | |
run: | | |
echo "Go coverage is lower than 74%: ${{ steps.testcov.outputs.coverage }}%" | |
exit 1 |