Skip to content

Commit b148730

Browse files
author
Benjamin Wilson Friedman
authored
Pages autodeploy and phpdoc style enforcing (#335)
* Added 'document-check' to add phpdoc checking during tests and added deploy for api ref on gh-pages * Wrapping filename in quotes * Moved bash out of package.json * Unescaping strings * Testing missing block comment * Fixing lint exception to expose phpdoc style issue * Restored class summary * removed comment
1 parent b760ca3 commit b148730

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ before_script:
1717
- sleep 3
1818
- npm run lint
1919
script:
20-
- npm run test:coverage
21-
20+
- npm run test:coverage
21+
- npm run document-check && if [[ `cat "output/checkstyle.xml" | grep "<error "` != "" ]]; then exit 1; fi
22+
before_deploy:
23+
- npm run document
24+
deploy:
25+
provider: pages
26+
skip_cleanup: true
27+
github_token: $GITHUB_TOKEN
28+
local_dir: output
29+
on:
30+
branch: master
2231
after_success:
23-
- bash <(curl -s https://codecov.io/bash)
32+
- bash <(curl -s https://codecov.io/bash)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"lint:fix": "./vendor/bin/phpcbf --standard=./phpcs.xml.dist ./src/Parse ./tests/Parse",
88
"start" : "./node_modules/parse-server-test/run-server",
99
"stop" : "./node_modules/parse-server-test/stop-server",
10+
"document-check" : "./vendor/bin/phpdoc -d ./src/ --template=checkstyle",
1011
"document" : "./vendor/bin/phpdoc -d ./src/ --title 'Parse PHP SDK API Reference' --template='responsive-twig'"
1112
},
1213
"repository": {

0 commit comments

Comments
 (0)