Skip to content

Commit

Permalink
DevKit updates (sonata-project#3918)
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed Jun 7, 2016
1 parent 53b2ae1 commit 9cb059e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ php:
sudo: false

cache:
timeout: 86400
pip: true
directories:
- $HOME/.composer/cache/files

Expand All @@ -30,6 +32,7 @@ env:
- SYMFONY_DEPRECATIONS_HELPER=weak
- TARGET=test
- UPSTREAM_URL=https://github.com/sonata-project/SonataAdminBundle.git
- XMLLINT_INDENT=" "

matrix:
fast_finish: true
Expand Down
1 change: 0 additions & 1 deletion .travis/before_install_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ fi

# To be removed when following PR will be merged: https://github.com/travis-ci/travis-build/pull/718
composer self-update --stable
composer config --quiet --global github-oauth.github.com $GITHUB_OAUTH_TOKEN
sed --in-place "s/\"dev-master\":/\"dev-${TRAVIS_COMMIT}\":/" composer.json

if [ "$SYMFONY" != "" ]; then composer require "symfony/symfony:$SYMFONY" --no-update; fi;
Expand Down
2 changes: 1 addition & 1 deletion .travis/check_relevant_lint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -ev

RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- *.{json})
RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- '*.json' '*.yml' '*.xml' '*.xliff')

if [[ -z ${RELEVANT_FILES} ]]; then echo -n 'KO'; exit 0; fi;
2 changes: 2 additions & 0 deletions .travis/install_lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
set -ev

composer global require sllh/composer-lint:@stable --prefer-dist --no-interaction

gem install yaml-lint
9 changes: 7 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ Thanks for your interest in Sonata projects!
First, check if you are up to date: is your version still supported, and are
you using the latest patch version?

If you are not sure this is a bug, consider posting your question on [Stack
Overflow](http://stackoverflow.com), using one of the sonata tags.
GitHub Issues is for **issues**, as opposed to question on how to use Sonata.
If you are not sure this is a bug, or simply want to ask such a question,
please post your question on [Stack Overflow](http://stackoverflow.com/questions/tagged/sonata),
using the `sonata` tags.

If you happen to find a bug, we kindly request you report it. However,
before submitting it, please check the [project documentation available
online](https://sonata-project.org/bundles/).
Expand Down Expand Up @@ -88,8 +91,10 @@ Some rules have to be respected about the test:
* `@codeCoverageIgnoreStart`
* `@codeCoverageIgnoreEnd`
* All test methods should be prefixed by `test`. Example: `public function testItReturnsNull()`.
* All test method names must be in camel case format.
* As opposed, the `@test` annotation is prohibited.
* Most of the time, the test class should have the same name as the targeted class, suffixed by `Test`.
* The `@expectedException*` annotations are prohibited. Use `PHPUnit_Framework_TestCase::setExpectedException()`.

### Writing a Pull Request

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ all:

lint:
composer validate
find . -name '*.yml' -not -path './vendor/*' | xargs yaml-lint
find . \( -name '*.xml' -or -name '*.xliff' \) -not -path './vendor/*' -type f \
-exec xmllint --encode UTF-8 --output '{}' --format '{}' \;
git diff --exit-code

test:
phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
Expand Down

0 comments on commit 9cb059e

Please sign in to comment.