Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Up minimal PHP version to 7.2 and integrate CodeStyle checking (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam authored May 22, 2020
1 parent 4311274 commit 983a6a9
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 12 deletions.
43 changes: 39 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ on:

jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions>
tests:
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup
name: PHP ${{ matrix.php }} (${{ matrix.setup }} setup)
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
setup: ['basic', 'lowest']
php: ['7.1', '7.2', '7.3', '7.4']
php: ['7.2', '7.3', '7.4']
include:
- php: '7.1'
- php: '7.2'
setup: 'basic'
coverage: 'true'
- php: '7.4'
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
run: composer update --prefer-dist --no-interaction --no-suggest

- name: Show most important packages versions
run: composer info | grep -e laravel/laravel -e phpunit/phpunit -e phpstan/phpstan
run: composer info | grep -e laravel -e spiral -e phpunit/phpunit -e phpstan/phpstan

- name: Execute tests
if: matrix.coverage != 'true'
Expand All @@ -76,3 +76,38 @@ jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-ac
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/clover.xml
fail_ci_if_error: false

cs-check:
name: Check Code Style
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: mbstring

- 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@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer 'hirak/prestissimo' package
run: composer global require hirak/prestissimo --update-no-dev

- name: Install Composer dependencies
run: composer update --prefer-dist --no-interaction --no-suggest

- name: Execute check
run: composer cs-check
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## v3.4.0

### Added

- Source code style checking using `spiral/code-style` package [#3]

### Changed

- Minimal required PHP version now is `7.2` [#3]

[#3]:https://github.com/spiral/roadrunner-laravel/issues/3

## v3.3.0

### Added
Expand Down
6 changes: 0 additions & 6 deletions TODO.md

This file was deleted.

7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"require": {
"php": "^7.1.3",
"php": "^7.2",
"ext-mbstring": "*",
"illuminate/contracts": "^5.5 || ~6.0 || ~7.0",
"illuminate/support": "^5.5 || ~6.0 || ~7.0",
Expand All @@ -32,7 +32,8 @@
"laravel/laravel": "^5.5 || ~6.0 || ~7.0",
"mockery/mockery": "^1.3",
"phpstan/phpstan": "~0.12",
"phpunit/phpunit": "^6.4 || ~7.5"
"phpunit/phpunit": "^6.4 || ~7.5",
"spiral/code-style": "^1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -51,6 +52,8 @@
"phpunit": "@php ./vendor/bin/phpunit --no-coverage --colors=always",
"phpunit-cover": "@php ./vendor/bin/phpunit",
"phpstan": "@php ./vendor/bin/phpstan analyze -c ./phpstan.neon.dist --no-progress --ansi",
"cs-check": "@php ./vendor/bin/spiral-cs check ./bin ./src ./tests --ansi",
"cs-fix": "@php ./vendor/bin/spiral-cs fix ./bin ./src ./tests --ansi",
"test": [
"@phpstan",
"@phpunit"
Expand Down

0 comments on commit 983a6a9

Please sign in to comment.