forked from OTRS/otrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (77 loc) · 2.53 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
language: perl
perl:
- "5.16"
- "5.18"
- "5.20"
- "5.22"
services:
- mysql
- postgresql
env:
- DB=mysql
- DB=postgresql
# Travis currently offers us 5 parallel builds, so limit to those for faster response time.
matrix:
exclude:
- perl: "5.16"
env: DB=mysql
- perl: "5.18"
env: DB=postgresql
- perl: "5.20"
env: DB=mysql
- perl: "5.22"
env: DB=postgresql
# Use 12.04 platform. Docker based VMs seem slower, and trusty beta has not enough available VMs.
# See https://docs.travis-ci.com/user/ci-environment/
sudo: required
addons:
apt:
packages:
- libxml2-utils
- gettext
# Install nodejs from external source as it is outdated in 12.04
before_install:
- curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
- sudo apt-get install -y nodejs
- npm -g install eslint
# We have to install the Perl modules via CPAN because the VMs use a perlbrew based Perl, not Ubuntu's system Perl.
install:
# generate ARCHIVE file
- perl bin/otrs.CheckSum.pl -a create
# install OTRSCodePolicy, but skip the SOPM to avoid validation errors.
- mkdir -p /tmp/OTRSCodePolicy
- git clone --depth=1 https://github.com/OTRS/otrscodepolicy.git /tmp/OTRSCodePolicy
- rm /tmp/OTRSCodePolicy/OTRSCodePolicy.sopm
- cp -rf /tmp/OTRSCodePolicy/* .
# install OTRS cpan dependencies
- cpanm --quiet --notest Code::TidyAll Perl::Tidy Perl::Critic Plack Date::Format Net::DNS Net::LDAP IO::Socket::SSL SOAP::Lite Text::CSV_XS JSON::XS XML::LibXML XML::LibXSLT YAML YAML::XS Archive::Zip Crypt::Eksblowfish Encode::HanExtra Mail::IMAPClient Template DBI DateTime
- cpanm --quiet --notest DBD::mysql || echo "Suppressing exit code $?"
- cpanm --quiet --notest DBD::Pg || echo "Suppressing exit code $?"
# configure OTRS
- scripts/tools/travis/setup.sh
# start web server
- plackup --port 5000 bin/cgi-bin/app.psgi > /tmp/plack.log 2>&1 &
script:
- perl bin/otrs.CheckModules.pl
- perl -cw bin/cgi-bin/index.pl
- perl -cw bin/cgi-bin/app.psgi
- perl bin/otrs.Console.pl Maint::Database::Check
- perl bin/otrs.Console.pl Maint::Config::Rebuild
- perl bin/otrs.Console.pl Dev::UnitTest::Run
notifications:
email:
recipients:
on_success: change
on_failure: always
irc:
channels:
- "chat.freenode.net#otrs-dev"
on_success: change
on_failure: always
webhooks:
urls:
- https://webhooks.gitter.im/e/2a09392eadbc65a19408
on_success: change
on_failure: always
on_start: never