🐛 fix: capture BDD test output properly to extract coverage percentage
This commit is contained in:
@@ -194,10 +194,13 @@ jobs:
|
||||
export DLC_DATABASE_PASSWORD=postgres
|
||||
export DLC_DATABASE_NAME=dance_lessons_coach_bdd_test
|
||||
export DLC_DATABASE_SSL_MODE=disable
|
||||
./scripts/run-bdd-tests.sh
|
||||
|
||||
# Extract BDD coverage percentage
|
||||
BDD_COVERAGE=$(grep "coverage:" <<< "$test_output" | grep -oP '\d+\.\d+' | head -1)
|
||||
# Run BDD tests and capture output
|
||||
test_output=$(./scripts/run-bdd-tests.sh 2>&1)
|
||||
echo "$test_output"
|
||||
|
||||
# Extract BDD coverage percentage from the output
|
||||
BDD_COVERAGE=$(echo "$test_output" | grep "coverage:" | grep -oP '\d+\.\d+' | head -1)
|
||||
echo "BDD Coverage: ${BDD_COVERAGE}%"
|
||||
|
||||
# Update BDD coverage badge
|
||||
|
||||
Reference in New Issue
Block a user