From 5f93743c545224a0cdc70f502412595f945e8414 Mon Sep 17 00:00:00 2001 From: Gabriel Radureau Date: Wed, 8 Apr 2026 13:11:33 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20capture=20BDD=20test=20ou?= =?UTF-8?q?tput=20properly=20to=20extract=20coverage=20percentage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci-cd.yaml b/.gitea/workflows/ci-cd.yaml index c5e0853..ecb9b40 100644 --- a/.gitea/workflows/ci-cd.yaml +++ b/.gitea/workflows/ci-cd.yaml @@ -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