[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 <[email protected]>
This commit is contained in:
Markus Podar
2020-11-30 15:13:01 +01:00
committed by GitHub
co-authored by laravel-ide-helper
parent 336ae44ef2
commit ca0cf7355a
7 changed files with 11 additions and 13 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ on:
jobs: jobs:
normalize: normalize:
timeout-minutes: 15 timeout-minutes: 15
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- name: Git checkout - name: Git checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
+1 -2
View File
@@ -7,7 +7,7 @@ jobs:
fix-style: fix-style:
name: Fix Code Style name: Fix Code Style
timeout-minutes: 15 timeout-minutes: 15
runs-on: ubuntu-latest runs-on: ubuntu-20.04
env: env:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
@@ -20,7 +20,6 @@ jobs:
with: with:
php-version: 7.4 php-version: 7.4
coverage: none coverage: none
tools: composer:v2
- name: Install dependencies - name: Install dependencies
run: composer update --prefer-dist --no-progress run: composer update --prefer-dist --no-progress
+3 -5
View File
@@ -12,7 +12,7 @@ on:
jobs: jobs:
php-lumen-integration-tests: php-lumen-integration-tests:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
timeout-minutes: 15 timeout-minutes: 15
env: env:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
@@ -35,13 +35,12 @@ jobs:
with: with:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
coverage: none coverage: none
tools: composer:v2
- name: Install dependencies - name: Install dependencies
run: | run: |
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
cd 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 composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source - name: Add package from source
@@ -73,7 +72,7 @@ jobs:
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ];then exit 1;fi
php-laravel-integration-tests: php-laravel-integration-tests:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
timeout-minutes: 15 timeout-minutes: 15
env: env:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
@@ -96,7 +95,6 @@ jobs:
with: with:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
coverage: none coverage: none
tools: composer:v2
- name: Install dependencies - name: Install dependencies
run: | run: |
+1 -1
View File
@@ -9,7 +9,7 @@ on:
jobs: jobs:
build: build:
timeout-minutes: 15 timeout-minutes: 15
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
+2 -2
View File
@@ -12,7 +12,7 @@ on:
jobs: jobs:
php-tests: php-tests:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
timeout-minutes: 15 timeout-minutes: 15
env: env:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
@@ -37,7 +37,7 @@ jobs:
with: with:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
coverage: none coverage: none
tools: composer:v2 extensions: pdo_sqlite
- name: Install dependencies - name: Install dependencies
run: | run: |
+1
View File
@@ -31,6 +31,7 @@
"phpdocumentor/type-resolver": "^1.1.0" "phpdocumentor/type-resolver": "^1.1.0"
}, },
"require-dev": { "require-dev": {
"ext-pdo_sqlite": "*",
"friendsofphp/php-cs-fixer": "^2", "friendsofphp/php-cs-fixer": "^2",
"illuminate/config": "^6 || ^7 || ^8", "illuminate/config": "^6 || ^7 || ^8",
"illuminate/view": "^6 || ^7 || ^8", "illuminate/view": "^6 || ^7 || ^8",
+2 -2
View File
@@ -35,7 +35,7 @@ namespace <?= $namespace == '__root' ? '' : trim($namespace, '\\') ?> {
//Method inherited from <?= $method->getDeclaringClass() ?> //Method inherited from <?= $method->getDeclaringClass() ?>
<?php endif; ?> <?php endif; ?>
<?php if ($method->isInstanceCall()) :?> <?php if ($method->isInstanceCall()) : ?>
/** @var <?=$method->getRoot()?> $instance */ /** @var <?=$method->getRoot()?> $instance */
<?php endif?> <?php endif?>
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>; <?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;
@@ -58,7 +58,7 @@ namespace <?= $namespace == '__root' ? '' : trim($namespace, '\\') ?> {
//Method inherited from <?= $method->getDeclaringClass() ?> //Method inherited from <?= $method->getDeclaringClass() ?>
<?php endif; ?> <?php endif; ?>
<?php if ($method->isInstanceCall()) :?> <?php if ($method->isInstanceCall()) : ?>
/** @var <?=$method->getRoot()?> $instance */ /** @var <?=$method->getRoot()?> $instance */
<?php endif?> <?php endif?>
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>; <?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;