Skip to content

Commit 04078db

Browse files
bigbesTotktonada
authored andcommitted
Initial Travis-CI test-runner
1 parent 19b4419 commit 04078db

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

.travis.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
language: java
2+
3+
sudo: required
4+
dist: trusty
5+
6+
jdk:
7+
- oraclejdk10
8+
- openjdk10
9+
10+
before_script:
11+
- src/test/travis.pre.sh
12+
13+
script:
14+
- mvn test
15+
- sudo cat /var/log/tarantool/jdk-testing.log

src/test/instance.lua

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
time = require('clock').time
2+
3+
box.cfg {
4+
listen = '0.0.0.0:3301',
5+
}
6+
7+
box.once('init', function()
8+
local sp = box.schema.space.create('user', { format = {
9+
{ name = 'id', type = 'integer' },
10+
{ name = 'name', type = 'string' },
11+
{ name = 'privs', type = 'any' },
12+
{ name = 'value', type = 'integer' },
13+
} })
14+
sp:create_index('primary', { sequence = true, parts = { 'id' } })
15+
16+
box.schema.user.create('test_ordin', { password = '2HWRXHfa' })
17+
box.schema.user.create('test_admin', { password = '4pWBZmLEgkmKK5WP' })
18+
19+
box.schema.user.grant('test_ordin', 'read,write', 'user')
20+
box.schema.user.grant('test_admin', 'execute', 'super')
21+
end)
22+

src/test/travis.pre.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
curl http://download.tarantool.org/tarantool/1.9/gpgkey | sudo apt-key add -
6+
release=`lsb_release -c -s`
7+
8+
sudo rm -f /etc/apt/sources.list.d/*tarantool*.list
9+
sudo tee /etc/apt/sources.list.d/tarantool_1.9.list <<- EOF
10+
deb http://download.tarantool.org/tarantool/1.9/ubuntu/ $release main
11+
deb-src http://download.tarantool.org/tarantool/1.9/ubuntu/ $release main
12+
EOF
13+
14+
sudo apt-get update
15+
sudo apt-get -y install tarantool tarantool-common
16+
17+
sudo cp src/test/instance.lua /etc/tarantool/instances.enabled/jdk-testing.lua
18+
sudo tarantoolctl stop example
19+
sudo tarantoolctl start jdk-testing

0 commit comments

Comments
 (0)