-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
69 lines (60 loc) · 2.67 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
language: perl
services:
- docker
env:
global:
- MYSQL_VERSION=5.7
- DOCKER_USERNAME=cpantestersbot
- DOCKER_IMAGE_NAME=cpantesters/schema
- DOCKER_VERSION_TAG=${DOCKER_IMAGE_NAME}:${TRAVIS_BUILD_NUMBER}
- secure: TwXUAXVF3hoRxup9W6QPSLtLAP48PzPSaX/zzmGvXLU36iasD4se1MhZE+FeM3M51Y6qnTWQ/j/5y3GsfZ5QGiaaLtbGVayal8iniBU+A9Dd1giBS6zv65baiclOSJ1MHT8i7xNh64rWDtmlX2An7UkugPS4v6aRtrnBmizhtJtpsBUiZ1+J85QEbo+Syna2g5dilZSG4fJdp8jkm2DRaJ77nYedCUvPn0TSXksEaz5vY93VkDv/7Aiqxz8nHZT2O1zWv2KFToofDOpI5jg8IYa0MMx9ANnvc7aRu9AJQRVgtK4wet5/Z4jnGqU8FDsvnpTBFe1I1W73Ifx+R6vJ1GW+LB/FfhrJIw9NmEnmutwRxD0PiTqmdLhAPJEheFSpp+aiiASssD4a0/roRf+xiFG50NEK/b9jZAWBl2OjuMjrN9CUsDp4t+boU4B0RyOQD3g2+K4x4J98QfGXyYjs6ak0/M+LUZKnXCh+UVnSHiMAfGFjb543sPTN6LyRzEN/L7fz9ikV2mqFI3XVf55cvV+CgYw92QfQtm52HjLDesBesclL1f3Mou2ajTy/kIUMzhZFV/T+Un5ybXQDGiQXxlJTVArVC9aJx+OJkL1nJhmQd427p2tysUOnr/E6/cOIBKoFCi6MnIz5q5Ti2hYTFAVPpKjty/8Mc42JrjvSxUQ=
matrix:
include:
- perl: "5.24"
- perl: "5.24"
env: COVERAGE=1
- perl: "5.26"
env: BUILD_DOCKER=yes
before_install:
- if [ x"$MYSQL_VERSION" != "x" ];
then
sudo service mysql stop;
sudo aptitude purge -y mysql-server libmysqlclient-dev mysql-server-5.6 mysql-common-5.6 mysql-client-5.6 libmysqlclient18 mysql-client-core-5.6 mysql-server-core-5.6 libdbd-mysql-perl mysql-common;
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5;
. /etc/lsb-release;
sudo add-apt-repository "deb http://repo.mysql.com/apt/ubuntu/ $DISTRIB_CODENAME mysql-$MYSQL_VERSION";
sudo apt-get update;
sudo DEBIAN_FRONTEND=noninteractive apt-get -q --yes --fix-broken --allow-unauthenticated --option DPkg::Options::=--force-confnew install mysql-server libmysqlclient-dev;
sudo mysql_upgrade -u root --password='' --force;
sudo service mysql restart;
fi
- git clone git://github.com/travis-perl/helpers ~/travis-perl-helpers
- source ~/travis-perl-helpers/init
- build-perl
- perl -V
- build-dist
- cd $BUILD_DIR
install:
- cpan-install --deps
- cpan-install --coverage
before_script:
- coverage-setup
script:
- perl Makefile.PL
- make
- prove -bl -s -j$(test-jobs) $(test-files)
after_success:
- coverage-report
deploy:
- provider: script
skip_cleanup: true
on:
branch: master
condition: $BUILD_DOCKER = 'yes'
script:
- cd ..;
docker pull "$DOCKER_IMAGE_NAME" || true;
docker build --pull --cache-from "$DOCKER_IMAGE_NAME"
--tag $DOCKER_IMAGE_NAME --tag $DOCKER_VERSION_TAG .;
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
docker push $DOCKER_IMAGE_NAME;