feat: modularise MIME detection and document extension workflow #30
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: Test | |
| on: | |
| push: | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| branches: | |
| - 'main' | |
| pull_request: | |
| paths: | |
| - '**.php' | |
| - 'composer.json' | |
| branches: | |
| - 'main' | |
| workflow_dispatch: | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: [ '8.1', '8.2', '8.3', '8.4', '8.5' ] | |
| continue-on-error: ${{ matrix.php == '8.5' }} | |
| name: PHP ${{ matrix.php }} Test | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v5 | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: pcov | |
| env: | |
| COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction | |
| - name: Run phpcs | |
| run: composer cs-check | |
| - name: Execute tests | |
| run: composer test -- --coverage-clover=coverage.xml | |
| - name: Run codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |