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

PHP CodeSniffer addition #122

Open
wants to merge 7 commits into
base: main
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
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: php-actions/composer@v5 # or alternative dependency management
- name: run tests
run: composer test
- name: change owner of phpcs
run: sudo chmod 777 ./vendor/bin/phpcs
- name: sniff
run: composer sniff
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ composer.phar
/vendor/
deploy
.DS_Store
.idea/
.idea/
.phpunit.result.cache
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,10 @@ How to run your own instance of indiewebify.me for development:

All of the interesting stuff is in `/web/index.php` — or at least is until that gets too big and needs moving.

===

![workflow](https://github.com/indieweb/indiewebify-me/actions/workflows/ci.yml/badge.svg)




2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
runtime: php55
runtime: php72
api_version: 1
automatic_scaling:
max_idle_instances: 1
Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@
"indieweb/rel-me": "^0.1.1"
},
"require-dev": {
"phpunit/phpunit": "*"
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "3.*"
},
"autoload": {
"files": []
},
"scripts": {
"test": "phpunit --bootstrap tests/bootstrap.php",
"sniff": "phpcs --standard=phpcs.xml */*.php",
"snifferfix" : "phpcbf --standard=phpcs.xml */*.php"
}
}
Loading