-
Notifications
You must be signed in to change notification settings - Fork 345
/
.travis.yml
65 lines (57 loc) · 1.5 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
# 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.4
- 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
env:
- COMPOSER_NO_INTERACTION=1
addons:
apt:
packages:
- jq
cache:
directories:
- vendor
- $HOME/.composer/cache
before_install:
- nvm install 12
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi
- composer self-update
install:
- phpenv config-rm xdebug.ini
- npm run install-dependencies
script:
- if [ "$LINT_JS" = true ]; then npm run lint:client; fi
- npm run lint:server
- if [ "$CS_FIXER" = true ]; then npm run cs:server; fi
- npm run test:server
before_deploy:
- git config --global user.email 'Travis CI'
- git config --global user.name '[email protected]'
- 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