Skip to content

Commit

Permalink
Remove debug and add live output
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Aug 2, 2024
1 parent c45f748 commit d4527e7
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions .github/workflows/coverage-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,20 @@ jobs:
run: |
mkdir -p coverage
echo "Starting Unit Tests..."
(
cd unit_tests
vendor/bin/pest --colors=always --coverage-php=../coverage/unit.cov --testsuite=UnitFramework 2>&1 | sed -E 's/^/[UNIT] /'
echo "[UNIT] Tests completed"
) > unit_output.log 2>&1 &
# Function to run tests
run_tests() {
local suite=$1
local testsuite=$2
cd ${suite}_tests
vendor/bin/pest --colors=always --coverage-php=../coverage/${suite}.cov --testsuite="$testsuite" 2>&1 | sed -E "s/^/[${suite^^}] /"
}
echo "Starting Feature Tests..."
(
cd feature_tests
vendor/bin/pest --colors=always --coverage-php=../coverage/feature.cov --testsuite=FeatureHyde,FeatureFramework,Publications,"Realtime Compiler" 2>&1 | sed -E 's/^/[FEATURE] /'
echo "[FEATURE] Tests completed"
) > feature_output.log 2>&1 &
# Run tests in parallel and combine output
(run_tests unit UnitFramework) &
(run_tests feature "FeatureHyde,FeatureFramework,Publications,Realtime Compiler") &
echo "Waiting for tests to complete..."
# Wait for all background jobs to finish
wait
echo "All tests completed"
echo "Unit Test Output:"
cat unit_output.log
echo "Feature Test Output:"
cat feature_output.log
- name: Check Coverage Files
run: |
echo "Checking coverage files..."
ls -l coverage/
[ -f coverage/unit.cov ] && echo "Unit coverage file exists" || echo "Unit coverage file is missing"
[ -f coverage/feature.cov ] && echo "Feature coverage file exists" || echo "Feature coverage file is missing"
- name: Download phpcov
run: wget https://phar.phpunit.de/phpcov.phar
Expand Down Expand Up @@ -114,4 +98,4 @@ jobs:
- name: Ping statistics server with test results
run: |
curl https://github.com/raw/hydephp/develop/6e9d17f31879f4ccda13a3fec4029c9663bccec0/monorepo/scripts/ping-openanalytics-testrunner.php -o ping.php
php ping.php "Monorepo Coverage Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}
php ping.php "Monorepo Coverage Tests" ${{ secrets.OPENANALYTICS_TOKEN }} ${{ github.ref_name }}

0 comments on commit d4527e7

Please sign in to comment.