aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 13d946abdb26aa47c2c34f8d2625e897e781bb66 (plain) (blame)
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
language: erlang

otp_release:
  - 19.3
  - 23.1.2

os: linux

dist: xenial

services:
  - redis
  - mysql
  - postgresql

before_install:
  - sudo apt-get -qq update
  - pip install --user coveralls-merge

install:
  - sudo apt-get -qq install libexpat1-dev libyaml-dev libpam0g-dev libsqlite3-dev libgd-dev libwebp-dev

before_script:
  # Ulimit: See Travis-CI issue report: https://github.com/travis-ci/travis-ci/issues/3328
  - mysql -u root -e "CREATE USER 'ejabberd_test'@'localhost' IDENTIFIED BY 'ejabberd_test';"
  - mysql -u root -e "CREATE DATABASE ejabberd_test;"
  - mysql -u root -e "GRANT ALL ON ejabberd_test.* TO 'ejabberd_test'@'localhost';"
  - mysql -u root ejabberd_test < sql/mysql.sql
  - psql -U postgres -c "CREATE USER ejabberd_test WITH PASSWORD 'ejabberd_test';"
  - psql -U postgres -c "CREATE DATABASE ejabberd_test;"
  - psql -U postgres ejabberd_test -f sql/pg.sql
  - psql -U postgres -c "GRANT ALL PRIVILEGES ON DATABASE ejabberd_test TO ejabberd_test;"
  - psql -U postgres ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ejabberd_test;"
  - psql -U postgres ejabberd_test -c "GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO ejabberd_test;"

cache:
  directories:
  - deps/

script:
  - ./autogen.sh
  - ./configure --prefix=/tmp/ejabberd --enable-all --disable-odbc --disable-elixir
  - make update
  - make
  - make install -s
  - make xref
  - ./tools/hook_deps.sh ebin
  - sed -i -e 's/ct:pal/ct:log/' test/suite.erl
  - ln -sf ../sql priv/
  - echo "" >> rebar.config
  - echo '{ct_extra_params, "-verbosity 20"}.' >> rebar.config
  - escript ./rebar skip_deps=true ct -v
  - grep -q 'TEST COMPLETE,.* 0 failed' logs/raw.log
  - test $(find logs -empty -name error.log)

after_script:
  - find logs -name suite.log -exec cat '{}' ';'

after_failure:
  - find logs -name exunit.log -exec cat '{}' ';'
  - find logs -name ejabberd.log -exec cat '{}' ';'
  - find logs -name suite.log -exec cat '{}' ';' | awk 'BEGIN{RS="\n=case";FS="\n"} /=result\s*failed/ {print "=case" $0}'

after_success:
  - coveralls-merge erlang.json

notifications:
  email: false