🔧 does this help? #11
Workflow file for this run
This file contains 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: PHP Composer | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
php: ["8.0",8.1,8.2] | |
laravel: [^8.43,^9,^10] | |
dependency-version: [prefer-lowest, prefer-stable] | |
exclude: | |
- php: "8.0" | |
laravel: ^10 | |
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl | |
coverage: xdebug | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.composer/cache/files | |
key: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
restore-keys: ${{ runner.os }}-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer- | |
- name: Install dependencies | |
run: | | |
composer require "laravel/framework:${{ matrix.laravel }}" --no-progress --no-update | |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress --no-suggest | |
- name: Run Tests | |
run: composer run-script test | |
- name: Upload Coverage to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_SERVICE_NAME: github | |
run: | | |
rm -rf composer.* vendor/ | |
composer require php-coveralls/php-coveralls | |
vendor/bin/php-coveralls |