Fix / Solve f4 dependency issue #29
Workflow file for this run
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: Tests | |
| on: | |
| # Run testing on all push and pull requests for the main branch that have committed changes in PHP files | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - '**.php' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - '**.php' | |
| # Make it possible to run the workflow manually | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| # Define the matrix of different PHP and dependency versions | |
| strategy: | |
| # Fail the whole workflow if one of the jobs fails | |
| fail-fast: true | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| php: [ 8.2, 8.3, 8.4 ] | |
| dependency-version: [ prefer-stable ] | |
| name: ${{ matrix.os }} / PHP ${{ matrix.php }} / ${{ matrix.dependency-version }} | |
| steps: | |
| #- name: Configure operating system | |
| # if: matrix.os == 'ubuntu-latest' | |
| # run: sudo apt-get update && sudo apt-get install -y locales locales-all | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ matrix.php }}-${{ matrix.dependency-version }}-${{ hashFiles('**/composer.lock') }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: xdebug | |
| # extensions: mbstring, gd, intl | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-progress --${{ matrix.dependency-version }} | |
| - name: Run test suite | |
| run: composer test -- --coverage-clover ./coverage.xml | |
| - name: Upload coverage reports to Codecov | |
| # Make sure the Codecov action is only executed once | |
| if: matrix.os == 'ubuntu-latest' && matrix.php == '8.2' && matrix.dependency-version == 'prefer-stable' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| verbose: true |