Skip to content

Commit

Permalink
Merge pull request #365 from perftools/php-cs-fixer-gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc authored Oct 28, 2020
2 parents 54ca2a6 + 217948c commit 5cde83e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
pull_request:

jobs:
tests:
name: PHP CS Fixer
runs-on: ubuntu-20.04

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.2
tools: php-cs-fixer:2.16, cs2pr
coverage: none

- name: Install dependencies with composer
run: composer install --no-interaction --no-progress --no-suggest

- name: Run php-cs-fixer
run: php-cs-fixer fix --verbose --diff --dry-run --format=checkstyle | cs2pr

# vim:ft=yaml:et:ts=2:sw=2
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ services:
- mysql
- postgresql

cache:
directories:
- $HOME/.composer/cache

install:
- .travis/install.sh

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"config": {
"platform": {
"php": "7.0.0",
"php": "7.0.8",
"ext-mongodb": "1.3.0"
},
"sort-packages": true
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5cde83e

Please sign in to comment.