Skip to content

Commit

Permalink
Merge pull request #1219 from greg0ire/setup-cs-workflow
Browse files Browse the repository at this point in the history
Migrate cs job to Github Actions
  • Loading branch information
ostrolucky authored Sep 26, 2020
2 parents 474dae6 + cb7eaf1 commit 89d5459
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 6 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@

name: "Coding Standards"

on: ["pull_request", "push"]

jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"

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@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-locked-"

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

# https://github.com/doctrine/.github/issues/3
- name: "Run PHP_CodeSniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ jobs:
install:
- travis_retry composer update -n --prefer-dist

- stage: Code Quality
env: CODING_STANDARDS
php: 7.3
script:
- ./vendor/bin/phpcs

- stage: Coverage
php: 7.3
install:
Expand Down

0 comments on commit 89d5459

Please sign in to comment.