Small improvements for github actions (#961)

* Remove travis leftovers

* gha: remove --no-interaction

* gha: use separate job for style check and use composer scripts

* gha: give workflow a nice name

* gha: remove packages we don't need, reduce workflow runtime

Co-authored-by: Barry vd. Heuvel <[email protected]>
This commit is contained in:
Markus Podar
2020-06-22 21:07:19 +02:00
committed by GitHub
co-authored by Barry vd. Heuvel
parent 5402b5ebfa
commit ea17a4076b
3 changed files with 31 additions and 10 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
# Ignore all test and documentation with "export-ignore". # Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore /.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore /.gitignore export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore /phpunit.xml.dist export-ignore
/tests export-ignore /tests export-ignore
+30 -6
View File
@@ -1,8 +1,12 @@
name: Tests
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
php-tests: php-tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
COMPOSER_NO_INTERACTION: 1
strategy: strategy:
matrix: matrix:
@@ -57,12 +61,32 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
composer remove phpro/grumphp vimeo/psalm --no-interaction --no-update --dev composer remove phpro/grumphp vimeo/psalm --no-update --dev
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --no-progress composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-update --no-progress
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest composer update --${{ matrix.dependency-version }} --prefer-dist --no-suggest --no-progress
- name: Execute Unit Tests - name: Execute Unit Tests
run: vendor/bin/phpunit run: composer test
- name: Check PSR-12 Codestyle check-style:
run: vendor/bin/phpcs --standard=psr2 src/ name: Check Code Style
runs-on: ubuntu-latest
env:
COMPOSER_NO_INTERACTION: 1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none
- name: Install dependencies
run: |
composer remove phpro/grumphp vimeo/psalm --no-update --dev
composer update --prefer-dist --no-suggest --no-progress
- run: composer check-style
-3
View File
@@ -2,7 +2,6 @@
[![Latest Version on Packagist][ico-version]][link-packagist] [![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md) [![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Total Downloads][ico-downloads]][link-downloads] [![Total Downloads][ico-downloads]][link-downloads]
**Complete PHPDocs, directly from the source** **Complete PHPDocs, directly from the source**
@@ -299,8 +298,6 @@ The Laravel IDE Helper Generator is open-sourced software licensed under the [MI
[ico-version]: https://img.shields.io/packagist/v/barryvdh/laravel-ide-helper.svg?style=flat-square [ico-version]: https://img.shields.io/packagist/v/barryvdh/laravel-ide-helper.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square [ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/barryvdh/laravel-ide-helper/master.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/barryvdh/laravel-ide-helper.svg?style=flat-square [ico-downloads]: https://img.shields.io/packagist/dt/barryvdh/laravel-ide-helper.svg?style=flat-square
[link-packagist]: https://packagist.org/packages/barryvdh/laravel-ide-helper [link-packagist]: https://packagist.org/packages/barryvdh/laravel-ide-helper
[link-travis]: https://travis-ci.org/barryvdh/laravel-ide-helper
[link-downloads]: https://packagist.org/packages/barryvdh/laravel-ide-helper [link-downloads]: https://packagist.org/packages/barryvdh/laravel-ide-helper