forked from notadd/notadd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (47 loc) · 1.79 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
sudo: false
language: php
env:
global:
- archive=no
- DB=mysql
matrix:
fast_finish: true
include:
- php: 7.0
- php: 7.0
env: DB=postgres
- php: 7.1
- php: 7.1
env:
- archive=yes
- DB=postgres
- php: 7.2
- php: 7.2
env: DB=postgres
services:
- postgresql
- mysql
cache:
directories:
- $HOME/.composer/cache
before_install:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database notadd;' -U postgres; echo "$DB"; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS notadd;'; echo "$DB"; fi"
install:
- composer clearcache
- composer install
- php notadd jwt:generate
- sh -c "if [ '$archive' = 'yes' ]; then tar -cvf notadd.tar --exclude=.git ../notadd; fi"
- sh -c "if [ '$archive' = 'yes' ]; then xz -z9 notadd.tar; fi"
- sh -c "if [ '$DB' = 'postgres' ]; then php notadd integration:configuration --driver=pgsql --host=127.0.0.1 --port=5432 --database=notadd --username=postgres --password=postgres --prefix=pre_; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then php notadd integration:configuration --driver=mysql --host=127.0.0.1 --port=3306 --database=notadd --username=root --prefix=pre_; fi"
- php notadd integration
script:
- vendor/bin/phpunit --verbose
after_success:
- sh -c "if [ '$archive' = 'yes' ]; then curl -T notadd.tar.xz http://v0.api.upyun.com/notadd/download/notadd-master.tar.xz -u "$UPYUN" -v; fi"
- bash <(curl -s https://codecov.io/bash) -t "$CODACY_PROJECT_TOKEN"
notifications:
webhooks:
- https://hook.bearychat.com/=bwA22/travis/52fa443470377f35e5a3d068b8d2d5ca
- https://hook.bearychat.com/=bwA7K/travis/3c04d191a6066d3e178ab8d93643e708