Add teste unitário #91
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "PHPUnit - CI" | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| pull_request: | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| extensions: xdebug | |
| ini-values: memory_limit=512M | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Install Composer dependencies | |
| run: composer install --prefer-dist --no-interaction --no-progress --no-suggest | |
| - name: Check Composer platform requirements | |
| run: composer check-platform-reqs | |
| - name: Show PHP version | |
| run: php -v | |
| - name: Run PHPUnit tests with coverage | |
| run: ./vendor/bin/phpunit --configuration phpunit.xml --coverage-clover=coverage.xml | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml |