-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow Laravel 8 * add github actions script
- Loading branch information
1 parent
322f181
commit 41ceff5
Showing
2 changed files
with
60 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,57 @@ | ||
name: CI Build | ||
name: CI | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches-ignore: | ||
- master | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
jobs: | ||
quality: | ||
name: Code Quality Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Composer | ||
uses: MilesChou/composer-action@v1.0.1 | ||
with: | ||
args: install | ||
- name: Run Psalm Checks | ||
run: ./vendor/bin/psalm --output-format=compact --show-info=false | ||
|
||
test: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v1 | ||
- name: Install Composer | ||
uses: MilesChou/composer-action@v1.0.1 | ||
with: | ||
args: install | ||
- name: Run PHPUnit | ||
run: ./vendor/bin/phpunit | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: [ '7.4', '8.0' ] | ||
laravel: [ '6.*', '7.*', '8.*' ] | ||
prefer: [ 'prefer-lowest', 'prefer-stable' ] | ||
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} --${{ matrix.prefer }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: none | ||
tools: composer:v2 | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup problem matchers for PHP | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ matrix.prefer }}- | ||
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}- | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer require "illuminate/http:${{ matrix.laravel }}" "illuminate/routing:${{ matrix.laravel }}" --no-interaction --no-update | ||
composer update --${{ matrix.prefer }} --prefer-dist --no-interaction | ||
- name: Test with phpunit | ||
run: ./vendor/bin/phpunit | ||
|
||
- name: Run Psalm Checks | ||
run: ./vendor/bin/psalm --output-format=github --show-info=false |
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