acb8ca6b9ce5de5397be992f976db1e684a7560e
[yaffs-website] / vendor / consolidation / annotated-command / .travis.yml
1 language: php
2
3 branches:
4   # Only test the master branch and SemVer tags.
5   only:
6     - master
7     - '/^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+.*$/'
8
9 matrix:
10   include:
11     - php: 7.2
12       env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"'
13     - php: 7.1
14       env: 'SCENARIO=symfony4'
15     - php: 7.0.11
16       env: 'HIGHEST_LOWEST="update"'
17     - php: 7.0.11
18     - php: 5.6
19     - php: 5.5
20     - php: 5.4
21       env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest'
22
23 sudo: false
24
25 cache:
26   directories:
27     - vendor
28     - $HOME/.composer/cache
29
30 install:
31   - 'scenarios/install "${SCENARIO}" "${HIGHEST_LOWEST-install}"'
32
33 script:
34   - composer test
35
36 after_success:
37   - 'travis_retry php vendor/bin/coveralls -v'
38   - |
39     # Only do post-build actions in one environment, and only if there is a GITHUB token.
40     if [ -z "$DO_POST_BUILD_ACTIONS" ] ; then
41       return
42     fi
43     if [ -z "$GITHUB_TOKEN" ]; then
44       echo "No GITHUB_TOKEN defined; exiting."
45       return
46     fi
47     ###
48     # Run composer lock update on cron jobs.
49     # See: https://github.com/danielbachhuber/composer-lock-updater
50     ###
51     if [ "$TRAVIS_EVENT_TYPE" != "cron" ] ; then
52       echo "Not a cron job; exiting."
53       return
54     fi
55     ###
56     # Only run on one job of a master branch build
57     ###
58     if [ "master" != "$TRAVIS_BRANCH" ] ; then
59       echo "composer.lock update only runs on the master branch."
60       return
61     fi
62     ###
63     # Install composer-lock-updater
64     ###
65     export PATH="$HOME/.composer/vendor/bin:$PATH"
66     composer global require danielbachhuber/composer-lock-updater
67     ###
68     # Optional: install Sensio Labs security checker to include security advisories in PR comments
69     ###
70     mkdir -p $HOME/bin
71     wget -O $HOME/bin/security-checker.phar http://get.sensiolabs.org/security-checker.phar
72     chmod +x $HOME/bin/security-checker.phar
73     export PATH="$HOME/bin:$PATH"
74     ###
75     # Install hub for creating GitHub pull requests
76     ###
77     wget -O hub.tgz https://github.com/github/hub/releases/download/v2.2.9/hub-linux-amd64-2.2.9.tgz
78     tar -zxvf hub.tgz
79     export PATH=$PATH:$PWD/hub-linux-amd64-2.2.9/bin/
80     ###
81     # Run composer-lock-updater
82     ###
83     clu
84
85
86
87