forked from Ensembl/ensembl-compara
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
173 lines (158 loc) · 7.32 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
os: linux
language: generic
env:
global:
# yamllint disable-line rule:line-length
- secure: bGSZASCtRCcE2VZ3u4hdvjh6CDHe+Uo3MR7B4eobSFFhZVjIN3/DKaGrQYprEeSIB/vb75rveyTheO3qe3lHwq71e18cBk2ulQA6/L0eUJYsoR3u2y7d9whu8dS97IoLzize6hItxJFP8TmRaJBtWqOixyWHNW72X/fKF1a192E=
addons:
apt:
packages:
- graphviz
services:
- mysql
cache:
pip: true
directories:
- $HOME/deps
# Clone all repositories, setup the directory structure and the environment
before_install:
# yamllint disable-line rule:indentation
- cpanm -nq local::lib
- eval "$(perl -Mlocal::lib=${HOME}/deps)"
# yamllint disable rule:line-length
- git clone --depth 1 https://github.com/Ensembl/ensembl-git-tools.git
- export PATH=$PATH:$PWD/ensembl-git-tools/bin
- git clone --branch release/107 --depth 1 https://github.com/Ensembl/ensembl-test.git || git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-test.git
- git clone --branch release/107 --depth 1 https://github.com/Ensembl/ensembl-rest.git || git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-rest.git
- git clone --branch release/107 --depth 1 https://github.com/Ensembl/ensembl-funcgen.git || git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-funcgen.git
- git clone --branch release/107 --depth 1 https://github.com/Ensembl/ensembl-variation.git || git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-variation.git
- git clone --branch release/107 --depth 1 https://github.com/Ensembl/ensembl-io.git || git clone --branch master --depth 1 https://github.com/Ensembl/ensembl-io.git
- git-ensembl --clone --branch master --secondary_branch main --depth 1 ensembl
- git-ensembl --clone --branch main --depth 1 ensembl-datacheck
# yamllint enable rule:line-length
- git-ensembl --clone --branch main --depth 1 ensembl-hive
- git-ensembl --clone --branch main --depth 1 ensembl-taxonomy
- ln -s . ensembl-compara
- git clone --branch v1.6.x --depth 1 https://github.com/bioperl/bioperl-live
- git clone --branch release-1-6-9 --depth 1 https://github.com/bioperl/bioperl-run
- sed -i '/Bio::DB::HTS/d' ensembl-rest/cpanfile
# Setup the environment variables
- export ENSEMBL_ROOT_DIR=$PWD
- export EHIVE_ROOT_DIR=$PWD/ensembl-hive
- export PERL5LIB=$PERL5LIB:$PWD/bioperl-live
- export PERL5LIB=$PERL5LIB:$PWD/bioperl-run/lib
- export PERL5LIB=$PERL5LIB:$PWD/modules
- export PERL5LIB=$PERL5LIB:$PWD/travisci/fake_libs/
- export PERL5LIB=$PERL5LIB:$PWD/ensembl/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-rest/lib
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-hive/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-test/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-funcgen/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-variation/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-taxonomy/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-io/modules
- export PERL5LIB=$PERL5LIB:$PWD/ensembl-datacheck/lib
- cp -f travisci/MultiTestDB.conf.travisci modules/t/MultiTestDB.conf
- cp -f ensembl-rest/travisci/MultiTestDB.conf.travisci ensembl-rest/t/MultiTestDB.conf
- cp -f ensembl/travisci/MultiTestDB.conf.travisci.mysql ensembl/modules/t/MultiTestDB.conf
- mysql -u root -h localhost -e 'GRANT ALL PRIVILEGES ON *.* TO "travis"@"%"'
# What jobs to run and in which order
jobs:
include:
- language: perl
perl: 5.30
name: "Housekeeping (all languages)"
install:
- sudo apt-get -y install shellcheck
# --user is required on Perl VMs because it's the system pip/python
- pip install --user yamllint
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
- cpanm --quiet --installdeps --notest .
- yamllint --version
- shellcheck --version
script: prove -rv ./travisci/all-housekeeping/
- language: perl
perl: 5.30
name: "SQL unit tests"
install:
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
script: prove -r ./travisci/sql-unittest/
- language: perl
dist: trusty # 5.22 is the minimum on xenial
perl: 5.14
name: "Perl unit tests on the minimum version"
env:
- COVERAGE=true
install:
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
- cpanm --quiet --installdeps --notest --cpanfile ensembl-hive/cpanfile .
- cpanm --quiet --installdeps --notest --cpanfile ensembl-rest/cpanfile .
- cpanm --quiet --installdeps --notest .
- cpanm --quiet --notest Devel::Cover::Report::Codecov
script: ./travisci/perl-unittest_harness.sh
- language: perl
perl: 5.30
name: "Perl unit tests on the latest version, with code coverage"
env:
- COVERAGE=true
install:
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
- cpanm --quiet --installdeps --notest --cpanfile ensembl-hive/cpanfile .
- cpanm --quiet --installdeps --notest --cpanfile ensembl-rest/cpanfile .
- cpanm --quiet --installdeps --notest .
- cpanm --quiet --notest Devel::Cover::Report::Codecov
script: ./travisci/perl-unittest_harness.sh
after_success:
- cover --nosummary -report codecov
- language: perl
perl: 5.30
name: "Perl external unit tests on the latest version, with code coverage"
env:
- COVERAGE=true
install:
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
# 8.43 is the last version compatible with Perl 5.14
- cpanm --quiet --notest [email protected]
- cpanm --quiet --installdeps --notest --cpanfile ensembl-rest/cpanfile .
- cpanm --quiet --installdeps --notest --cpanfile ensembl-hive/cpanfile .
- cpanm --quiet --installdeps --notest .
- cpanm --quiet --notest Devel::Cover::Report::Codecov
script: ./travisci/perl-external_unittest_harness.sh
after_success:
- cover --nosummary -report codecov
- language: perl
perl: 5.30
name: "Perl linter"
install:
- cpanm --quiet --installdeps --notest --cpanfile ensembl/cpanfile .
script: ./travisci/perl-linter_harness.sh
- language: python
python: 3.7.9
name: "Python unit tests on the minimum version"
install:
- pip install -r requirements.txt -r requirements-test.txt
- pip install .
script:
- pytest --server=mysql://[email protected]:3306/ src/python/tests/
- language: python
python: 3.9
name: "Python unit tests on the latest version, with code coverage"
install:
- pip install codecov
- pip install -r requirements.txt -r requirements-test.txt
- pip install .
script:
# yamllint disable rule:line-length
- pytest --cov=./ --cov-report=term-missing --server=mysql://[email protected]:3306/ src/python/tests/
# yamllint enable rule:line-length
after_success:
- codecov
- language: python
python: 3.9
name: "Python linter"
install:
- pip freeze | grep -v -f requirements.txt - | grep -v '^#' | xargs pip uninstall -y
- pip install pylint mypy
- pip install -r requirements.txt
- pip install .
script: ./travisci/python-linter_harness.sh