forked from fossar/selfoss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (55 loc) · 1.41 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
# 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.3
- php: 7.2
- php: 7.1
- php: 7.0
env: CS_FIXER=true LINT_JS=true
- php: 5.6
env: DEPLOY=true
fast_finish: true
addons:
apt:
packages:
- jq
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- nvm install 6
- npm install -g grunt-cli
- npm install
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi
- utils/install-phars.sh
install:
- composer self-update
before_script:
- phpenv config-rm xdebug.ini
- composer install --prefer-dist --no-interaction
script:
- if [ "$LINT_JS" = true ]; then grunt lint:client; fi
- grunt lint:server
- if [ "$CS_FIXER" = true ]; then grunt cs:server; fi
before_deploy:
- source utils/package.sh
- source utils/bintray.sh
deploy:
- provider: bintray
file: utils/bintray.json
user: $BINTRAY_USER
key: $BINTRAY_KEY
skip_cleanup: true
on:
condition: $DEPLOY = true
- provider: releases
api_key: $GH_TOKEN
file: $SELFOSS_ZIPBALL
skip_cleanup: true
on:
tags: true
condition: $DEPLOY = true