Skip to content

Commit b5ec9f1

Browse files
author
Konstantin Nazarov
committed
Implement testing with luatest
1 parent 6a24870 commit b5ec9f1

23 files changed

+366
-709
lines changed

.editorconfig

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
# Unix-style newlines with a newline ending every file
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
[CMakeLists.txt]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.cmake]
14+
indent_style = space
15+
indent_size = 4
16+
17+
[*.lua]
18+
indent_style = space
19+
indent_size = 4
20+
21+
[*.{h,c,cc}]
22+
indent_style = tab
23+
tab_width = 8

.travis.yml

+84-31
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,97 @@
1-
sudo: required
2-
1+
sudo: false
2+
language: C
33
services:
44
- docker
5+
dist: xenial
6+
7+
cache:
8+
directories:
9+
- $HOME/.cache
10+
11+
git:
12+
depth: 100500
513

614
env:
715
global:
816
- PRODUCT=tarantool-metrics
9-
matrix:
10-
- TARGET=test VERSION=1_7
11-
- TARGET=test VERSION=1_9
12-
- TARGET=test VERSION=1_10
13-
- TARGET=test VERSION=2_0
14-
- OS=el DIST=6
15-
- OS=el DIST=7
16-
- OS=fedora DIST=26
17-
- OS=fedora DIST=27
18-
- OS=ubuntu DIST=trusty
19-
- OS=ubuntu DIST=xenial
20-
- OS=ubuntu DIST=artful
21-
- OS=debian DIST=wheezy
22-
- OS=debian DIST=jessie
23-
- OS=debian DIST=stretch
24-
25-
script:
26-
- git describe --long
27-
- |
28-
if [ "${TARGET}" = "test" ]; then
29-
./run-travis-tests.sh;
30-
else
31-
git clone https://github.com/packpack/packpack.git packpack;
32-
packpack/packpack;
33-
fi;
34-
35-
before_deploy:
36-
- ls -l build/
17+
18+
_test: &test
19+
before_install:
20+
- curl http://download.tarantool.org/tarantool/$TARANTOOL_VERSION/gpgkey | sudo apt-key add -
21+
- echo "deb http://download.tarantool.org/tarantool/$TARANTOOL_VERSION/ubuntu/ xenial main" |
22+
sudo tee /etc/apt/sources.list.d/tarantool.list
23+
- sudo apt-get -y update
24+
- sudo apt-get install -y tarantool tarantool-dev
25+
- tarantoolctl rocks make
26+
- tarantoolctl rocks install luatest 0.2.2
27+
script: .rocks/bin/luatest
28+
29+
_deploy: &deploy
30+
provider: packagecloud
31+
username: tarantool
32+
token: ${PACKAGECLOUD_TOKEN}
33+
dist: ${OS}/${DIST}
34+
package_glob: build/*.{deb,rpm}
35+
skip_cleanup: true
36+
on:
37+
branch: master
38+
condition: -n "${OS}" && -n "${DIST}" && -n "${PACKAGECLOUD_TOKEN}"
39+
40+
_packpack: &packpack
41+
stage: deploy
42+
script:
43+
- git describe --long
44+
- git clone https://github.com/packpack/packpack.git packpack
45+
- packpack/packpack
46+
- ls -l build/
47+
deploy:
48+
# Deploy packages to PackageCloud
49+
- <<: *deploy
50+
repository: "1_7"
51+
- <<: *deploy
52+
repository: "1_9"
53+
- <<: *deploy
54+
repository: "1_10"
55+
- <<: *deploy
56+
repository: "2x"
57+
- <<: *deploy
58+
repository: "2_2"
59+
60+
jobs:
61+
include:
62+
- <<: *test
63+
env: TARANTOOL_VERSION=1.10
64+
- <<: *test
65+
env: TARANTOOL_VERSION=2x
66+
67+
- <<: *packpack
68+
env: OS=el DIST=6
69+
- <<: *packpack
70+
env: OS=el DIST=7
71+
- <<: *packpack
72+
env: OS=fedora DIST=26
73+
- <<: *packpack
74+
env: OS=fedora DIST=27
75+
- <<: *packpack
76+
env: OS=fedora DIST=28
77+
- <<: *packpack
78+
env: OS=fedora DIST=29
79+
- <<: *packpack
80+
env: OS=ubuntu DIST=trusty
81+
- <<: *packpack
82+
env: OS=ubuntu DIST=xenial
83+
- <<: *packpack
84+
env: OS=ubuntu DIST=bionic
85+
- <<: *packpack
86+
env: OS=ubuntu DIST=cosmic
87+
- <<: *packpack
88+
env: OS=debian DIST=jessie
89+
- <<: *packpack
90+
env: OS=debian DIST=stretch
3791

3892
notifications:
3993
email:
4094
recipients:
4195
4296
on_success: change
4397
on_failure: always
44-

beautify_tests.sh

-31
This file was deleted.
File renamed without changes.

rockspecs/metrics-0.1.0-1.rockspec

-46
This file was deleted.

rockspecs/metrics-0.1.1-1.rockspec

-46
This file was deleted.

rockspecs/metrics-0.1.2-1.rockspec

-46
This file was deleted.

rockspecs/metrics-0.1.3-1.rockspec

-47
This file was deleted.

0 commit comments

Comments
 (0)