Run Tests #6
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: Run Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - '**.php' | |
| - '.github/workflows/**' | |
| - 'composer.json' | |
| - 'phpunit.xml.dist' | |
| push: | |
| branches: | |
| - develop | |
| - master | |
| paths: | |
| - '**.php' | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: PHPUnit Tests | |
| runs-on: ubuntu-latest | |
| container: | |
| image: php:8.3-cli | |
| options: --user root | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y git unzip libcurl4-openssl-dev | |
| docker-php-ext-install curl | |
| - name: Install Composer | |
| run: | | |
| curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run tests | |
| run: bin/phpunit |