Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/GitHub Linting action #282

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .distignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# Directories
/.circleci
/.git
/.github
/assets
- bin
/helpers
+ php52/vendor/bin
/tests
+ vendor/bin
- bin
.circleci

# Files
.distignore
.git
.gitignore
.phplint.yml
Dockerfile
Gruntfile.js
Makefile
build.sh
composer.json
composer.lock
docker-compose.yml
helpers
Dockerfile
Gruntfile.js
Makefile
package-lock.json
package.json
php-lint.sh
phpunit.xml.dist
readme.md
tests
assets
readme.md
31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Linting

on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master #can remove this if/when `develop` set as default branch

jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
coverage: none
tools: composer:v1
- name: composer install
run: composer install
- name: PHPCS check
uses: chekalsky/phpcs-action@v1
with:
phpcs_bin_path: './vendor/bin/phpcs .'