forked from fossar/selfoss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (51 loc) · 1.56 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
# This file lints the code, builds a package and then deploys it.
# For the deployment, $BINTRAY_USER, $BINTRAY_KEY and $GH_TOKEN environment
# variables need to be set.
language: php
matrix:
include:
- php: 7.1
- php: 7.0
env: CS_FIXER=true
- php: 5.6
- php: 5.5
- php: 5.4
env: DEPLOY=true
fast_finish: true
addons:
apt:
packages:
- jq
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- nvm install 6
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi
- if [ "$CS_FIXER" = true ]; then composer create-project --no-dev --no-interaction friendsofphp/php-cs-fixer utils/php-cs-fixer; fi
- composer create-project --no-dev --no-interaction jakub-onderka/php-parallel-lint utils/php-parallel-lint
install:
- composer self-update
before_script:
- composer install --prefer-dist --no-interaction
script:
- utils/php-parallel-lint/parallel-lint controllers daos helpers spouts templates
- if [ "$CS_FIXER" = true ]; then utils/php-cs-fixer/php-cs-fixer fix --verbose --dry-run --diff; fi
before_deploy:
- source utils/package.sh
- source utils/bintray.sh
deploy:
- provider: bintray
file: utils/bintray.json
user: $BINTRAY_USER
key: $BINTRAY_KEY
on:
condition: $DEPLOY = true
- provider: releases
api_key: $GH_TOKEN
file: $SELFOSS_ZIPBALL
skip_cleanup: true
on:
tags: true
condition: $DEPLOY = true