From 11f60a76392af8f8891ba5878e35430195d3b135 Mon Sep 17 00:00:00 2001 From: Juan Pablo Barreto <2080215+juampi92@users.noreply.github.com> Date: Tue, 15 Aug 2023 10:18:10 +0200 Subject: [PATCH] upgrade composer and gh action runner (#16) Laravel 8.* now does not use php 7.4 Somehow there was a bug with that. --- .github/workflows/run-tests.yml | 26 +++++++++++++++++++------- composer.json | 6 +++--- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5ed8be6..b962346 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,6 +1,10 @@ name: run-tests -on: [push, pull_request] +on: + push: + branches: [master] + pull_request: + branches: [master] jobs: test: @@ -10,9 +14,11 @@ jobs: matrix: os: [ubuntu-latest] php: [8.2, 8.1, 8.0, 7.4] - laravel: [9.*, 8.*, 7.*] + laravel: [10.*, 9.*, 8.*, 7.*] stability: [prefer-stable] include: + - laravel: 10.* + testbench: 8.* - laravel: 9.* testbench: 7.* - laravel: 8.* @@ -20,8 +26,16 @@ jobs: - laravel: 7.* testbench: 5.20 exclude: + - laravel: 10.* + php: 8.0 + - laravel: 10.* + php: 7.4 + - laravel: 9.* + php: 8.0 - laravel: 9.* php: 7.4 + - laravel: 8.* + php: 7.4 - laravel: 7.* php: 8.1 - laravel: 7.* @@ -31,7 +45,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -44,11 +58,9 @@ jobs: run: | echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction - + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --ignore-platform-reqs + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --ignore-platform-reqs - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index faae4a6..7a20bd0 100644 --- a/composer.json +++ b/composer.json @@ -12,11 +12,11 @@ ], "require": { "php" : "^7.4|^8.0|^8.1|^8.2", - "illuminate/support": "^7.0|^8.0|^9.0", - "illuminate/http": "^7.0|^8.0|^9.0" + "illuminate/support": "^7.0|^8.0|^9.0|^10.0", + "illuminate/http": "^7.0|^8.0|^9.0|^10.0" }, "require-dev": { - "orchestra/testbench": "^5.0|^6.0|^7.0", + "orchestra/testbench": "^5.0|^6.0|^7.0|^8.0", "phpunit/phpunit": "^9.4", "friendsofphp/php-cs-fixer": "^3.8", "phpstan/phpstan": "^1.9"