Run PHPCS and PHPStan in GitHub Actions

Fixes #76
This commit is contained in:
Oliver Davies 2020-09-04 21:39:02 +01:00
parent cbe60209e6
commit a08f93c188
2 changed files with 78 additions and 0 deletions

39
.github/workflows/coding-standards.yml vendored Normal file
View file

@ -0,0 +1,39 @@
name: Run coding standards checks
on:
push:
branches:
- production
pull_request:
jobs:
phpunit:
runs-on: ubuntu-latest
name: "Run coding standards checks"
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: |
~/.composer/cache/files
web/core
web/modules/constrib
web/themes/contrib
vendor
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run checks
run: make phpcs

View file

@ -0,0 +1,39 @@
name: Static analysis with PHPStan
on:
push:
branches:
- production
pull_request:
jobs:
phpunit:
runs-on: ubuntu-latest
name: Static analysis with PHPStan
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: |
~/.composer/cache/files
web/core
web/modules/constrib
web/themes/contrib
vendor
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-suggest
- name: Run checks
run: make phpstan