Skip to content

Commit

Permalink
move phpcs from travis to GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bendavies committed May 5, 2020
1 parent bc9d8ca commit 25e00a9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,36 @@ jobs:

- name: "Psalm"
run: "vendor/bin/psalm"

coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"

strategy:
matrix:
php-version:
- "7.4"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v1"
with:
path: "~/.composer/cache"
key: "${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "${{ matrix.php-version }}-composer-locked-"

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

- name: "Run squizlabs/php_codesniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ jobs:
env: PHPStan
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse
- stage: Smoke Testing
php: 7.3
env: PHP_CodeSniffer
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpcs

- stage: Test
php: 7.2
Expand Down

0 comments on commit 25e00a9

Please sign in to comment.