Add --no-coverage flag to Pest test command in CI workflow #10
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: Test Matrix | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - '[0-9]+.x' # Trigger for main version branch (e.g. 1.x, 2.x, 3.x, 4.x) | |
| - 'support/*' | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.2', '8.3'] | |
| laravel: ['^12.0', '^13.0'] | |
| dependencies: ['stable', 'lowest'] | |
| exclude: | |
| - php: '8.2' | |
| laravel: '^13.0' | |
| name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependencies }} deps | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout support package for local path repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: solutionforest/inspirecms-support | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| path: inspirecms-support | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Prepare local path dependency | |
| run: | | |
| rm -rf ../inspirecms-support | |
| ln -s "$PWD/inspirecms-support" ../inspirecms-support | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, pdo, sqlite, curl, dom, fileinfo, gd, intl | |
| coverage: none | |
| - name: Validate composer | |
| run: composer validate --strict | |
| - name: Set Composer root version | |
| run: echo "COMPOSER_ROOT_VERSION=dev-${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" >> $GITHUB_ENV | |
| - name: Align path repository version | |
| run: | | |
| php -r ' | |
| $file = "composer.json"; | |
| $branch = getenv("GITHUB_HEAD_REF") ?: getenv("GITHUB_REF_NAME"); | |
| $version = "dev-" . $branch; | |
| $content = file_get_contents($file); | |
| $composer = json_decode($content, true, 512, JSON_THROW_ON_ERROR); | |
| if (isset($composer["repositories"]) && is_array($composer["repositories"])) { | |
| foreach ($composer["repositories"] as &$repository) { | |
| if (($repository["type"] ?? null) === "path" && ($repository["url"] ?? null) === "../inspirecms-support") { | |
| $repository["options"] = $repository["options"] ?? []; | |
| $repository["options"]["versions"] = $repository["options"]["versions"] ?? []; | |
| $repository["options"]["versions"]["solution-forest/inspirecms-support"] = $version; | |
| } | |
| } | |
| unset($repository); | |
| } | |
| file_put_contents($file, json_encode($composer, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL); | |
| ' | |
| composer validate --strict | |
| - name: Configure Laravel version | |
| run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update --with-all-dependencies | |
| - name: Install dependencies (stable) | |
| if: matrix.dependencies == 'stable' | |
| run: composer update --prefer-dist --no-interaction --no-progress --with-all-dependencies | |
| - name: Install dependencies (lowest) | |
| if: matrix.dependencies == 'lowest' | |
| run: composer update --prefer-lowest --prefer-stable --no-interaction --no-progress --with-all-dependencies | |
| - name: Run tests | |
| run: vendor/bin/pest --no-coverage |