v2.0.0: Major Refactor - PSR-4 Autoloading & Performance Optimization #116
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: Unit Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit-tests: | |
| name: Unit tests - PHP ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, intl, json | |
| tools: composer:v2 | |
| coverage: none | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --no-check-publish | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache/files | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: | | |
| composer install --prefer-dist --no-progress --no-interaction | |
| cd plugin/juanma-jwt-auth-pro | |
| composer install --prefer-dist --no-progress --no-interaction | |
| - name: Check PHP syntax | |
| run: find plugin/juanma-jwt-auth-pro -name "*.php" -not -path "*/vendor/*" -exec php -l {} \; | |
| - name: Run unit tests (PHP compatibility) | |
| run: vendor/bin/phpunit -c phpunit-unit.xml --testdox |