From 109d5ef4c088c012847734656dbcf0c3d231db40 Mon Sep 17 00:00:00 2001 From: Lisa Deloach Date: Mon, 30 Nov 2020 15:13:01 +0100 Subject: [PATCH] [GHA] Misc improvements (#1101) * gha: be more specific which OS to use Avoids "surprises" when Github changes the underlying version, like they currently announce with a warning: > Ubuntu-latest workflows will use Ubuntu-20.04 soon. For more details, see https://github.com/actions/virtual-environments/issues/1816 Note: basically right now "latest" is actually 18.04 and not 20.04 * composer fix-style * gha: require league/flysystem:^1 for lumen 2.* doesn't work out of the box * gha: explicit version of composer isn't necessary anymore v2 is already the default * Be explicit to require the pdo SQLite extension for tests Co-authored-by: laravel-ide-helper --- .github/workflows/composer-normalize.yml | 2 +- .github/workflows/fix-code-style.yml | 3 +-- .github/workflows/run-integration-tests.yml | 8 +++----- .github/workflows/run-static-analysis.yml | 2 +- .github/workflows/run-tests.yml | 4 ++-- composer.json | 1 + resources/views/helper.php | 4 ++-- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml index d2e209a..a33c368 100644 --- a/.github/workflows/composer-normalize.yml +++ b/.github/workflows/composer-normalize.yml @@ -8,7 +8,7 @@ on: jobs: normalize: timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Git checkout uses: actions/checkout@v2 diff --git a/.github/workflows/fix-code-style.yml b/.github/workflows/fix-code-style.yml index f898df5..e9f45bd 100644 --- a/.github/workflows/fix-code-style.yml +++ b/.github/workflows/fix-code-style.yml @@ -7,7 +7,7 @@ jobs: fix-style: name: Fix Code Style timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: COMPOSER_NO_INTERACTION: 1 @@ -20,7 +20,6 @@ jobs: with: php-version: 7.4 coverage: none - tools: composer:v2 - name: Install dependencies run: composer update --prefer-dist --no-progress diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index bf3ef93..c4c7fbc 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -12,7 +12,7 @@ on: jobs: php-lumen-integration-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 15 env: COMPOSER_NO_INTERACTION: 1 @@ -35,13 +35,12 @@ jobs: with: php-version: ${{ matrix.php }} coverage: none - tools: composer:v2 - name: Install dependencies run: | composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample cd sample - composer require "league/flysystem" --no-update --no-progress + composer require "league/flysystem:^1" --no-update --no-progress composer update --prefer-stable --prefer-dist --no-progress - name: Add package from source @@ -73,7 +72,7 @@ jobs: if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi php-laravel-integration-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 15 env: COMPOSER_NO_INTERACTION: 1 @@ -96,7 +95,6 @@ jobs: with: php-version: ${{ matrix.php }} coverage: none - tools: composer:v2 - name: Install dependencies run: | diff --git a/.github/workflows/run-static-analysis.yml b/.github/workflows/run-static-analysis.yml index ea28c81..029b0cb 100644 --- a/.github/workflows/run-static-analysis.yml +++ b/.github/workflows/run-static-analysis.yml @@ -9,7 +9,7 @@ on: jobs: build: timeout-minutes: 15 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4cf5c7d..225b253 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -12,7 +12,7 @@ on: jobs: php-tests: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 timeout-minutes: 15 env: COMPOSER_NO_INTERACTION: 1 @@ -37,7 +37,7 @@ jobs: with: php-version: ${{ matrix.php }} coverage: none - tools: composer:v2 + extensions: pdo_sqlite - name: Install dependencies run: | diff --git a/composer.json b/composer.json index 1d340b3..07a587f 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,7 @@ "phpdocumentor/type-resolver": "^1.1.0" }, "require-dev": { + "ext-pdo_sqlite": "*", "friendsofphp/php-cs-fixer": "^2", "illuminate/config": "^6 || ^7 || ^8", "illuminate/view": "^6 || ^7 || ^8", diff --git a/resources/views/helper.php b/resources/views/helper.php index d4d2fb8..a985fe6 100644 --- a/resources/views/helper.php +++ b/resources/views/helper.php @@ -35,7 +35,7 @@ public static function getName() ?>(getParamsWithDefau //Method inherited from getDeclaringClass() ?> - isInstanceCall()) :?> + isInstanceCall()) : ?> /** @var getRoot()?> $instance */ shouldReturn() ? 'return ' : '' ?>getRootMethodCall() ?>; @@ -58,7 +58,7 @@ public static function getName() ?>(getParamsWithDefau //Method inherited from getDeclaringClass() ?> - isInstanceCall()) :?> + isInstanceCall()) : ?> /** @var getRoot()?> $instance */ shouldReturn() ? 'return ' : '' ?>getRootMethodCall() ?>;