-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #644 from rebing/mfn-gha
Switch from Travis to GHA
- Loading branch information
Showing
9 changed files
with
169 additions
and
132 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Code Analysis | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
static-analysis: | ||
name: Static Analysis | ||
runs-on: ubuntu-18.04 | ||
env: | ||
COMPOSER_NO_INTERACTION: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- run: composer update --prefer-dist --no-progress | ||
|
||
- run: composer phpstan -- --no-progress | ||
|
||
code-style-checker: | ||
name: Code Style checker | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- run: composer update --prefer-dist --no-progress | ||
|
||
- run: composer lint |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Integration tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
integration: | ||
strategy: | ||
matrix: | ||
integration: [laravel, lumen] | ||
name: ${{ matrix.integration }} | ||
runs-on: ubuntu-18.04 | ||
env: | ||
COMPOSER_NO_INTERACTION: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
|
||
# Due to version incompatibility with older Laravels we test, we remove it | ||
- run: composer remove --dev matt-allan/laravel-code-style --no-update | ||
- run: composer require illuminate/contracts:7.0 --no-update | ||
- run: composer remove --dev nunomaduro/larastan --no-update | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- run: composer install --prefer-dist --no-suggest | ||
|
||
- run: tests/integration-${{ matrix.integration }}.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
integration: | ||
strategy: | ||
matrix: | ||
php: [7.1, 7.2, 7.3, 7.4] | ||
laravel: [5.5.*, ^6.0, ^7.0] | ||
exclude: | ||
- php: 7.1 | ||
laravel: ^6.0 | ||
- php: 7.1 | ||
laravel: ^7.0 | ||
- php: 7.4 | ||
laravel: 5.5.* | ||
name: PHP ${{ matrix.php }} Laravel ${{ matrix.laravel }} | ||
runs-on: ubuntu-18.04 | ||
env: | ||
COMPOSER_NO_INTERACTION: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
# Due to version incompatibility with older Laravels we test, we remove it | ||
- run: composer remove --dev matt-allan/laravel-code-style --no-update | ||
- run: composer require illuminate/contracts:${{ matrix.laravel }} --no-update | ||
- run: composer remove --dev nunomaduro/larastan --no-update | ||
|
||
- name: Get composer cache directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}-composer- | ||
|
||
- run: composer update --prefer-dist --no-progress | ||
|
||
- run: composer require --dev orchestra/database:3.5 --prefer-dist --no-suggest | ||
if: matrix.laravel == '5.5.*' | ||
|
||
- name: Run tests (without lazyload types) | ||
run: vendor/bin/phpunit --colors=always --verbose | ||
|
||
- name: Run tests (with lazyload types) | ||
run: vendor/bin/phpunit --colors=always --verbose | ||
env: | ||
TESTS_ENABLE_LAZYLOAD_TYPES: 1 |
This file was deleted.
Oops, something went wrong.
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
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
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