-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
147 lines (130 loc) · 3.38 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
language: php
dist: trusty
sudo: required
services:
- docker
php:
- 7.2
- 7.3
env:
- "DB=ALL COVERAGE=ALL"
before_install:
- cd tests
- docker-compose up -d
- cd ..
- bash ./tests/install-sqlsrv.sh
install:
- composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit --coverage-clover=coverage.xml
- vendor/bin/spiral-cs check src tests
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage.xml
jobs:
include:
# PHP 7.4 builds does not support SQLServer yet
- stage: Test
php: 7.4snapshot
env:
- "DB=postgres,mysql,sqlite"
before_install:
- cd tests
- docker-compose up -d
- cd ..
script:
- vendor/bin/phpunit tests/Migrations/Driver/SQLite
- vendor/bin/phpunit tests/Migrations/Driver/MySQL
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
# Testing various PostgresSQL version
- stage: Test
php: 7.2
addons:
postgresql: "9.2"
env:
- "DB=postgres POSTGRES=9.2"
before_install:
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
postgresql: "9.3"
env:
- "DB=postgres POSTGRES=9.3"
before_install:
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
postgresql: "9.4"
env:
- "DB=postgres POSTGRES=9.4"
before_install:
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
postgresql: "9.5"
env:
- "DB=postgres POSTGRES=9.5"
before_install:
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
postgresql: "9.6"
env:
- "DB=postgres POSTGRES=9.6"
before_install:
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
postgresql: "10.0"
env:
- "DB=postgres POSTGRES=10.0"
before_install:
- bash ./tests/install-pgsql-10.sh
- psql -c 'create database spiral;' -U postgres
script:
- vendor/bin/phpunit tests/Migrations/Driver/Postgres
- stage: Test
php: 7.2
addons:
mariadb: "10.0"
env:
- "DB=mariadb MARIADB=10.0"
before_install:
- sudo bash ./tests/fix-binlog.sh
- mysql -e 'CREATE DATABASE spiral;'
script:
- vendor/bin/phpunit tests/Migrations/Driver/MySQL
- stage: Test
php: 7.2
addons:
mariadb: "10.1"
env:
- "DB=mariadb MARIADB=10.1"
before_install:
- mysql -e 'CREATE DATABASE spiral;'
script:
- vendor/bin/phpunit tests/Migrations/Driver/MySQL
- stage: Test
php: 7.2
addons:
mariadb: "10.2"
env:
- "DB=mariadb MARIADB=10.2"
before_install:
- mysql -e 'CREATE DATABASE spiral;'
script:
- vendor/bin/phpunit tests/Migrations/Driver/MySQL