-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
60 lines (50 loc) · 1.91 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
sudo: true
services:
docker
env:
global:
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
stages:
- test
- name: merge-deploy
python: 3.6
notifications:
email:
on_success: change
on_failure: always
jobs:
include:
- stage: test
name: "Running Tests"
language: minimal
before_script:
# request codecov to detect CI environment to pass through to docker
- ci_env=`bash <(curl -s https://codecov.io/env)`
script:
- openssl aes-256-cbc -K $encrypted_506e835c2891_key -iv $encrypted_506e835c2891_iv -in key.json.enc -out key.json -d
- curl https://sdk.cloud.google.com | bash > /dev/null
- source "$HOME/google-cloud-sdk/path.bash.inc"
- gcloud auth activate-service-account --key-file=key.json
- gcloud auth configure-docker
- docker build --tag seunglab/pychunkedgraph:$TRAVIS_BRANCH . || travis_terminate 1
- docker run $ci_env --rm seunglab/pychunkedgraph:$TRAVIS_BRANCH /bin/sh -c "tox -v -- --cov-config .coveragerc --cov=pychunkedgraph && codecov"
- stage: merge-deploy
name: "version bump and merge into master"
language: python
install:
- pip install bumpversion
before_script:
- "git clone https://gist.github.com/2c04596a45ccac57fe8dde0718ad58ee.git /tmp/travis-automerge"
- "chmod a+x /tmp/travis-automerge/auto_merge_travis_with_bumpversion.sh"
script:
- "BRANCHES_TO_MERGE_REGEX='develop' BRANCH_TO_MERGE_INTO=master /tmp/travis-automerge/auto_merge_travis_with_bumpversion.sh"
- stage: merge-deploy
name: "deploy to pypi"
language: python
install:
- pip install twine
before_script:
- "git clone https://gist.github.com/cf9b261f26a1bf3fae6b59e7047f007a.git /tmp/travis-autodist"
- "chmod a+x /tmp/travis-autodist/pypi_dist.sh"
script:
- "BRANCHES_TO_DIST='develop' /tmp/travis-autodist/pypi_dist.sh"