Skip to content

Commit

Permalink
[GHA] Misc improvements (#1101)
Browse files Browse the repository at this point in the history
* 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 actions/runner-images#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]>
  • Loading branch information
lisadeloach63 and laravel-ide-helper committed Nov 30, 2020
1 parent 25d22dd commit 109d5ef
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/composer-normalize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/fix-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -96,7 +95,6 @@ jobs:
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
timeout-minutes: 15
runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +37,7 @@ jobs:
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2
extensions: pdo_sqlite

- name: Install dependencies
run: |
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions resources/views/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefau
//Method inherited from <?= $method->getDeclaringClass() ?>
<?php endif; ?>

<?php if ($method->isInstanceCall()) :?>
<?php if ($method->isInstanceCall()) : ?>
/** @var <?=$method->getRoot()?> $instance */
<?php endif?>
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;
Expand All @@ -58,7 +58,7 @@ public static function <?= $method->getName() ?>(<?= $method->getParamsWithDefau
//Method inherited from <?= $method->getDeclaringClass() ?>
<?php endif; ?>

<?php if ($method->isInstanceCall()) :?>
<?php if ($method->isInstanceCall()) : ?>
/** @var <?=$method->getRoot()?> $instance */
<?php endif?>
<?= $method->shouldReturn() ? 'return ' : '' ?><?= $method->getRootMethodCall() ?>;
Expand Down

0 comments on commit 109d5ef

Please sign in to comment.