-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
66 lines (58 loc) · 1.89 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
language: node_js
node_js:
- 10
addons:
apt:
packages:
- libgconf-2-4
cache:
npm: true
directories:
- ~/.cache
services:
- docker
before_install:
- mkdir docker/data
- cp cypress/data/tracks.conf docker/data/tracks.conf
- cp cypress/data/Homo_sapiens.GRCh38.dna.chromosome.1.fa.fai docker/data/Homo_sapiens.GRCh38.dna.chromosome.1.fa.fai
- cp data/jbrowse.conf docker/data/jbrowse.conf
- cd docker/data
- curl -o Homo_sapiens.GRCh38.dna.chromosome.1.fa.gz http://ftp.ensembl.org/pub/release-94/fasta/homo_sapiens/dna/Homo_sapiens.GRCh38.dna.chromosome.1.fa.gz
- gzip -d Homo_sapiens.GRCh38.dna.chromosome.1.fa.gz
- cd ../../
install:
- npm ci
- cd docker
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then docker-compose build --build-arg plugin_version=${TRAVIS_PULL_REQUEST_BRANCH}; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then docker-compose build --build-arg plugin_version=${TRAVIS_BRANCH}; fi'
- docker-compose up -d
- cd ../
- cpanm --notest Text::Markdown DateTime JSON
- cd ../
- git clone https://github.com/GMOD/jbrowse.git
- cp -R $TRAVIS_BUILD_DIR/gdc-viewer/ jbrowse/plugins/
- cd $TRAVIS_BUILD_DIR
- cp data/jbrowse.conf ../jbrowse/jbrowse.conf
script:
- $(npm bin)/cypress run
# Only build below if on a tag
- |
if [[ "x$TRAVIS_TAG" != "x" ]]; then
cd ../jbrowse/
RELEASE_VERSION=`node -e 'require("fs").readFile("src/JBrowse/package.json", (e,d)=>console.log(JSON.parse(d).version))'`
make -f build/Makefile release-min
rm -rf JBrowse-*/
unzip -q JBrowse-$RELEASE_VERSION.zip
cd $TRAVIS_BUILD_DIR
fi
deploy:
provider: s3
skip_cleanup: true
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET
bucket: "gdc-jbrowse"
local-dir: ../jbrowse/JBrowse-$RELEASE_VERSION
upload-dir: code/gdc-viewer/$TRAVIS_BRANCH
on:
repo: LincolnSteinLab/gdc-viewer
tags: true