-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.gitlab-ci.yml
87 lines (77 loc) · 2.75 KB
/
.gitlab-ci.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
#
# Test-job template
#
.ensembl_test_template:
image: dockerhub.ebi.ac.uk/ensembl-infrastructure/ensembl-ci-docker-images:${PERL_VERSION}
services:
- mysql:5.6
variables:
# FIXME: set some password for both users
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_USER: "travis"
MYSQL_PASSWORD: ""
USER: "gitlabci"
before_script:
- apt-get update
- apt-get install -y build-essential cpanminus git
- apt-get install -y default-libmysqlclient-dev default-mysql-client
- apt-get install -y libssl-dev sqlite3
- git clone --branch=main --depth=1 https://github.com/Ensembl/ensembl.git
- git clone --branch=release-1-6-924 --depth=1 https://github.com/bioperl/bioperl-live.git
# Install IO::Scalar before processing the cpanfile because one of the dependencies
# of Test::FTP::Server requires it yet does not declare it as a dependency, and
# cpanm - or to be precise the module CPAN::Meta::Prereqs - scrambles the order
# of entries in cpanfiles (see https://github.com/miyagawa/cpanfile/issues/42).
# Cpanfile upstream categorically refuses to implement the forcing of dependencies
# (see https://github.com/miyagawa/cpanfile/issues/3) so we will have to keep this
# here until either Net::FTPServer has been fixed or we stop using Test::FTP::Server
- cpanm -n IO::Scalar
- cpanm -v --installdeps --notest .
- ( cd ensembl && cpanm -v --installdeps --notest . )
- cpanm -n Devel::Cover::Report::Coveralls
- cpanm -n DBD::SQLite
- cp travisci/MultiTestDB.conf.gitlabci.mysql modules/t/MultiTestDB.conf.mysql
- cp travisci/MultiTestDB.conf.travisci.SQLite modules/t/MultiTestDB.conf.SQLite
- mysql -u root -h mysql -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"%"'
#
# Test jobs
#
test:perl5.14-sqlite:
stage: test
extends: .ensembl_test_template
variables:
PERL_VERSION: "5.14"
COVERALLS: "false"
DB: "sqlite"
script:
- ./travisci/harness.sh
test:perl5.30-mysql:
stage: test
extends: .ensembl_test_template
variables:
PERL_VERSION: "5.30"
# Note: relies on the secret variable COVERALLS_REPO_TOKEN for report uploads to work
COVERALLS: "true"
DB: "mysql"
script:
- ./travisci/harness.sh
#
# Triggers for dependent builds
#
# The template. It doesn't presently support PRs before they are
# merged (would need extended run condition and better selection of
# downstream branches) - but then again, we do not trigger dependent
# builds for PRs on Travis either.
.dependent_template:
stage: test
only:
- master
- /^release/\d+$/
trigger:
# Use the same branch as in this project
branch: ${CI_COMMIT_REF_NAME}
# Actual trigger jobs
test:trigger_main:
extends: .dependent_template
trigger:
project: ensembl-gh-mirror/ensembl