Moving to mkdocs-material because I hated all other php alternatives … #17
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 unit tests with coverage | |
| run: XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --testsuite unit --coverage-clover coverage-unit.xml --log-junit junit-unit.xml | |
| - name: Run integration tests with coverage | |
| if: ${{ !cancelled() }} | |
| run: XDEBUG_MODE=coverage vendor/bin/phpunit --configuration phpunit.xml --testsuite integration --coverage-clover coverage-integration.xml --log-junit junit-integration.xml | |
| - name: Upload unit coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage-unit.xml | |
| flags: unit | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload integration coverage to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: coverage-integration.xml | |
| flags: integration | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload unit test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| files: junit-unit.xml | |
| flags: unit | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload integration test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| files: junit-integration.xml | |
| flags: integration | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |