forked from picocms/Pico
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (59 loc) · 1.66 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
dist: trusty
sudo: false
language: php
cache:
directories:
- $HOME/.composer/cache/files
jobs:
include:
# Test stage
- php: 5.3
dist: precise
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: nightly
- php: hhvm
- php: hhvm-nightly
# Deployment stage
- stage: deploy
sudo: required
install:
- '[ "$TRAVIS_PULL_REQUEST" == "false" ] || travis_terminate 0'
- '[ -n "$TRAVIS_TAG" ] || [[ ",$DEPLOY_PHPDOC_BRANCHES," == *,"$TRAVIS_BRANCH",* ]] || travis_terminate 0'
- install.sh --deploy
script:
- deploy.sh
before_deploy:
- '[ "$TRAVIS_TAG" == "v$(php -r "require_once(\"lib/Pico.php\"); echo Pico::VERSION;")" ]'
- create-release.sh "$TRAVIS_BUILD_DIR/pico-release-$TRAVIS_TAG.tar.gz"
deploy:
provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file: pico-release-$TRAVIS_TAG.tar.gz
skip_cleanup: true
tag_name: $TRAVIS_TAG
target_commitish: $TRAVIS_COMMIT
name: Version ${TRAVIS_TAG:1}
draft: true
on:
tags: true
# Ignore nightly build failures
allow_failures:
- php: nightly
- php: hhvm-nightly
fast-finish: true
before_install:
- export PATH="$TRAVIS_BUILD_DIR/.build:$PATH"
- export PICO_TOOLS_DIR="$HOME/__picocms_tools"
- git clone --branch="$TOOLS_REPO_BRANCH" "https://github.com/$TOOLS_REPO_SLUG.git" "$PICO_TOOLS_DIR"
- . "$PICO_TOOLS_DIR/init/travis.sh.inc"
install:
- install.sh
before_script:
- export PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
script:
- phpcs --standard=.phpcs.xml "$TRAVIS_BUILD_DIR"