forked from silverstripe/sspak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
27 lines (23 loc) · 1.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
sudo: false
language: php
php:
- '5.6'
env:
global:
secure: "fQhSvmkxT2mrzIL9tfY54KVRIXWrMZo1bjOx4mfNOrKyrkG3GnIUndSmTAZQU/NTiXDIH+N8aIEP3VpDEfDv4XxI3A+5CAayJKTGuLDcyXy0vVf54BfzebG38oH93v2VE2YTeoG/L+Nb6A4+/hb+/sG2vWol+IKD1av/HxZdZZo="
before_script:
- git config user.email "[email protected]"
- git config user.name "SilverStripe"
# This inverted conditional format ensures that PRs/non-master branches don't report a failure
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*'
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git config push.default simple'
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git fetch --unshallow'
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git remote set-url origin "https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}"'
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || git checkout -qf "${TRAVIS_COMMIT}"'
script:
- composer selfupdate || true
- composer install --dev --no-progress --no-interaction
- bin/build-phar
- vendor/bin/phpunit tests
after_success:
- '[ "${TRAVIS_PULL_REQUEST}" != "false" -o "${TRAVIS_BRANCH}" != "master" ] || bin/upload-phar > /dev/null 2>&1'