-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
75 lines (65 loc) · 2.09 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
language: c
sudo: false
addons:
apt:
packages:
- unixodbc
- unixodbc-dev
- libmyodbc
- libsqliteodbc
- odbc-postgresql
services:
- postgresql
- mysql
env:
global:
- LUAROCKS=2.3.0
- LUAODBC_TEST_DBMS=MySQL
matrix:
- LUA=lua5.1
- LUA=lua5.2
- LUA=lua5.3
- LUA=luajit # latest stable version (2.0.4)
# - LUA=luajit2.0 # current head of 2.0 branch
# - LUA=luajit2.1 # current head of 2.1 branch
branches:
only:
- master
before_install:
- source .travis/setenv_lua.sh
- pip install --user cpp-coveralls
- luarocks install luacov-coveralls
- luarocks install lunitx
- mysql --version
- mysql -e "create database IF NOT EXISTS test;" -uroot
- psql --version
- psql -c "create database test;" -U postgres
- cp ./test/.odbcinst.ini $HOME
- odbcinst -i -s -h -f ./test/mytest.odbc.ini
- odbcinst -i -s -h -f ./test/pgtest.odbc.ini
- echo "select 'hello'" | isql MySQL-test -b
- echo "select 'hello'" | isql PgSQL-test -b
install:
- luarocks make rockspec/odbc-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage";
- lua -e "odbc=require'odbc';odbc.environment():drivers(print)"
- lua -e "odbc=require'odbc';odbc.environment():datasources(print)"
- lua -e "odbc=require'odbc';print(odbc.connect('MySQL-test','root',''))"
- lua -e "odbc=require'odbc';print(odbc.driverconnect'Driver=MySQL;db=test;uid=root')"
- lua -e "odbc=require'odbc';print(odbc.connect('PgSQL-test','postgres',''))"
- lua -e "odbc=require'odbc';print(odbc.driverconnect'Driver=PostgreSQL ANSI;Server=localhost;Port=5432;Database=test;Uid=postgres')"
script:
- cd test/dba
- lunit.sh test.lua
- cd ..
- lunit.sh test.lua
- lua luasql/test-luasql.lua
# - LUAODBC_TEST_DBMS=PgSQL
# - lunit.sh test.lua
# - lua luasql/test-luasql.lua
after_success:
- coveralls -b .. -r .. -e install --dump c.report.json
- luacov-coveralls -v -j c.report.json
notifications:
email:
on_success: change
on_failure: always