docs-coverage script

This commit is contained in:
Ulf Gebhardt 2025-02-04 13:12:37 +01:00
parent b6bf4a2cff
commit 4c58a90ab3
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 13 additions and 1 deletions

View File

@ -48,5 +48,8 @@ jobs:
run: |
npm install
npm run docs:generate
bash -c "if (( $(sed -nE 's/.*>([0-9]{1,3})%<.*/\1/p' docs/coverage.svg | head -1) > $COVERAGE_REQUIRED )) then echo \"echo "Coverage: $(sed -nE 's/.*>([0-9]{1,3})%<.*/\1/p' docs/coverage.svg | head -1)/$COVERAGE_REQUIRED\";exit 0; else exit 1; fi"
./scripts/docs-coverage.sh
working-directory: ./
bash -c "COVERAGE=$(sed -nE 's/.*>([0-9]{1,3})%<.*/\1/p' docs/coverage.svg | head -1); echo $COVERAGE;if (( $COVERAGE >= $COVERAGE_REQUIRED )) then exit 0; else echo \"Coverage: $COVERAGE/$COVERAGE_REQUIRED\"; exit 1; fi"

9
scripts/docs-coverage.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
COVERAGE=$(sed -nE 's/.*>([0-9]{1,3})%<.*/\1/p' docs/coverage.svg | head -1)
if (( $COVERAGE >= $COVERAGE_REQUIRED )) then
exit 0;
else
echo "Coverage: $COVERAGE/$COVERAGE_REQUIRED";
exit 1;
fi