-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.travis.yml
46 lines (39 loc) · 1.23 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
language: python
sudo: true
services:
- mysql
- postgresql
env:
- LUA="5.1"
- LUA="5.2"
- LUA="5.3"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libmysqlclient-dev libsqlite3-dev postgresql-server-dev-all
- sudo pip install hererocks
- hererocks ~/hererocks -r^ --lua $LUA
- export PATH=$PATH:~/hererocks/bin
- eval $(luarocks path --bin)
- luarocks install luacheck
- luarocks install busted
install:
- luarocks make luadbi-scm-0.rockspec
- luarocks make luadbi-mysql-scm-0.rockspec
- luarocks make luadbi-postgresql-scm-0.rockspec
- luarocks make luadbi-sqlite3-scm-0.rockspec
before_script:
- mysql -u root -e 'CREATE DATABASE luadbi;'
- mysql -u root -e "CREATE USER 'luadbi' IDENTIFIED BY 'testing12345!!!';"
- mysql -u root -e "GRANT ALL ON luadbi.* TO 'luadbi';"
- mysql -u root luadbi < tests/schemas/mysql.sql
- psql -c "CREATE DATABASE luadbi;" -U postgres
- psql -c "CREATE USER luadbi WITH PASSWORD 'testinguser-12345!!!';" -U postgres
- psql luadbi < tests/schemas/postgresql.sql
- cat tests/schemas/sqlite3.sql | sqlite3 tests/sqlite3-test
script:
- luacheck DBI.lua
- luacheck tests || true
- cd tests && busted run_tests.lua
branches:
only:
- master