diff --git a/.github/workflows/php_test.yaml b/.github/workflows/php_test.yaml new file mode 100644 index 0000000..2a10d5f --- /dev/null +++ b/.github/workflows/php_test.yaml @@ -0,0 +1,36 @@ +name: PHP Unit Tests +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + extensions: mbstring, xml, curl, pdo_mysql, zip + coverage: none + tools: composer:v2 + + - name: Cache Composer dependencies + uses: actions/cache@v4 + with: + path: vendor + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-interaction + + - name: Run PHPUnit + run: vendor/bin/phpunit --configuration phpunit.xml.dist --colors=always \ No newline at end of file