Skip to content

Commit

Permalink
Enhance GitHub Actions workflow for improved testing visibility
Browse files Browse the repository at this point in the history
- Added 'tree' command to display the directory structure at various stages of the testing process, providing better insight into the file organization.
- Included debug output for the PHPUnit execution to facilitate troubleshooting.
- Ensured that the phpunit.xml file is correctly located before running tests, enhancing the reliability of the testing framework.

These changes improve the clarity and maintainability of the testing workflow, aiding developers in understanding the project structure during test execution.
  • Loading branch information
ivangrynenko committed Jan 22, 2025
1 parent a4c05c6 commit e0d5e55
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
git \
unzip \
libzip-dev \
tree \
&& docker-php-ext-install zip
- name: Install Composer
Expand All @@ -30,14 +31,30 @@ jobs:
- name: Run tests
working-directory: /var/www/html
run: |
echo "Current directory structure before copy:"
pwd
ls -la $GITHUB_WORKSPACE
echo "phpunit.xml location:"
find $GITHUB_WORKSPACE -name phpunit.xml
# Copy project files to working directory
cp -r $GITHUB_WORKSPACE/. .
echo "Current directory structure after copy:"
pwd
ls -la
echo "Working directory phpunit.xml:"
find . -name phpunit.xml
# Install dependencies
composer install --no-interaction --no-progress
# Run PHPUnit tests
echo "Directory structure after composer install:"
tree -L 3
# Run PHPUnit tests with debug
./vendor/bin/phpunit \
-v \
--debug \
--configuration phpunit.xml \
tests/Unit/

0 comments on commit e0d5e55

Please sign in to comment.