forked from openxpki/openxpki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (66 loc) · 1.95 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
# We use our own Perl setup (language "generic" uses a stripped-down TravisCI image)
language: generic
# Ubuntu 18.04 "Bionic" (Debian Buster equivalent)
dist: bionic
env:
global:
# assume the Git submodule is cloned into config/ according to .gitmodules
- OXI_TEST_SAMPLECONFIG_DIR=$TRAVIS_BUILD_DIR/config
- OXI_TEST_DB_MYSQL_NAME=openxpki
- OXI_TEST_DB_MYSQL_USER=openxpki
- OXI_TEST_DB_MYSQL_PASSWORD=openxpki
- OXI_TEST_DB_MYSQL_DBHOST=localhost
- OXI_TEST_DB_MYSQL_DBPORT=3306
- OXI_TEST_DB_MYSQL_DBUSER=root
- OXI_TEST_DB_MYSQL_DBPASSWORD=
matrix:
- OXI_TEST_RUN=unit_coverage
- OXI_TEST_RUN=api2
- OXI_TEST_RUN=webui
- OXI_TEST_RUN=client
cache:
directories:
- $HOME/perl5/lib/perl5
before_cache:
- rm -Rf $HOME/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/OpenXPKI
#
# OS packages
#
addons:
apt:
packages:
- libmariadbclient-dev
- openssl
- libssl-dev
- pkg-config
- cpanminus
- figlet
mariadb: '10.1'
#
# Service setup
#
before_install:
- ./tools/testenv/mysql-wait-for-db.sh
- ./tools/testenv/mysql-create-db.sh
- ./tools/testenv/mysql-create-user.sh
- ./tools/testenv/mysql-create-schema.sh
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
#
# Dependencies / modules
#
install:
- cpanm --quiet --notest PPI
- ./tools/scripts/makefile2cpanfile.pl > ./cpanfile
- cpanm --quiet --notest --installdeps ./
- cpanm --quiet --notest --reinstall Devel::Cover
# "--reinstall" needed for Devel::Cover because we told TravisCI to cache ~/perl5/lib/perl5
# but not ~/perl5/bin - so on next run the "cover" script will be gone
- cpanm --quiet --notest Devel::Cover::Report::Coveralls
#
# Build
#
# (must be specified if "language" is "generic")
script:
- which perl
- perl -v
- ./tools/scripts/travis-install-and-test.sh