-
Notifications
You must be signed in to change notification settings - Fork 43
/
.travis.yml
28 lines (28 loc) · 938 Bytes
/
.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
language: crystal
script:
- crystal spec
- crystal tool format --check
services:
- mysql
- postgresql
addons:
postgresql: "9.4"
apt:
sources:
- travis-ci/sqlite3
packages:
- sqlite3
before_script:
- mysql -e 'create database crecto_test'
- mysql -Dcrecto_test < spec/migrations/mysql_migrations.sql
- psql -c 'create database crecto_test;' -U postgres
- psql $PG_URL < spec/migrations/pg_migrations.sql
- sqlite3 ./crecto_test.db < spec/migrations/sqlite3_migrations.sql
- if [ ! -z "$PG_URL" ]; then cp ./spec/travis_pg_repo.cr ./spec/repo.cr; fi
- if [ ! -z "$MYSQL_URL" ]; then cp ./spec/travis_mysql_repo.cr ./spec/repo.cr; fi
- if [ ! -z "$SQLITE3_PATH" ]; then cp ./spec/travis_sqlite_repo.cr ./spec/repo.cr; fi
env:
matrix:
- PG_URL=postgres://postgres@localhost:5432/crecto_test
- MYSQL_URL=mysql://root@localhost/crecto_test
- SQLITE3_PATH=sqlite3://./crecto_test.db