Refactored Extensions framework 🫣 #12
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: CI | |
| on: | |
| push: | |
| branches: [master, develop] | |
| pull_request: | |
| branches: [master, develop] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: ['8.1', '8.2', '8.3', '8.4'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: dom, simplexml, libxml | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run tests | |
| run: vendor/bin/phpunit --configuration phpunit.xml | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: dom, simplexml, libxml | |
| coverage: xdebug | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run tests with coverage | |
| run: XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --coverage-clover coverage.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage.xml | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| docs: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| extensions: dom, simplexml, libxml | |
| - name: Install phpDocumentor | |
| run: curl -sL https://phpdoc.org/phpDocumentor.phar -o /usr/local/bin/phpdoc && chmod +x /usr/local/bin/phpdoc | |
| - name: Build docs | |
| run: phpdoc run --config phpdoc.xml | |
| - name: Upload docs artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs | |
| path: docs-output/ |