forked from Opentrons/opentrons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
178 lines (159 loc) · 7.72 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
174
175
176
177
178
# opentrons platform travis config
cache:
pip: true
yarn: true
stages:
- test
- name: app
# don't build the app on pull requests
if: type != pull_request
# base configs
_deploy_s3: &deploy_s3
provider: s3
skip_cleanup: true
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
acl: public_read
on:
repo: Opentrons/opentrons
all_branches: true
_app_stage_build: &app_stage_build
stage: app
language: node_js
install:
- pip install --user awscli
- make install-js
before_script:
# pull API wheel from S3
- mkdir -p ./api/dist
- aws s3 sync $OT_CI_TEMP_S3_PATH/api/dist ./api/dist
deploy:
- # deploy Opentrons App to S3
<<: *deploy_s3
local-dir: app-shell/dist/publish
bucket: $OT_APP_DEPLOY_BUCKET
upload-dir: $OT_APP_DEPLOY_FOLDER
jobs:
include:
# test, build, and upload wheels for Python projects
- stage: test
name: 'Python API unit tests, build API docs'
language: python
python: 3.6
before_install:
- sudo apt-get install -y --no-install-recommends texlive-fonts-recommended texlive-latex-extra texlive-fonts-extra dvipng texlive-latex-recommended
install:
- pip install awscli
- nvm install
- yarn global add [email protected] [email protected]
- make install-py
script:
- make test-py
- make lint-py
- make -C api docs docs-pdf
after_success:
- make coverage
- aws s3 sync ./api/dist $OT_CI_TEMP_S3_PATH/api/dist
deploy:
# push docs on tag
- provider: pages
skip_cleanup: true
keep-history: false
local-dir: api/docs/dist
github-token: $GITHUB_TOKEN
on:
branch: edge
repo: Opentrons/opentrons
# push to real pypi on tag
- provider: script
skip_cleanup: true
script: make -C api deploy pypi_username=${PYPI_USER} pypi_password=${PYPI_PASSWORD}
on:
all_branches: true
condition: $TRAVIS_TAG =~ ^v
repo: Opentrons/opentrons
# push to test pypi on pr
- provider: script
skip_cleanup: true
script: make -C api deploy-staging pypi_username=${TEST_PYPI_USER} pypi_password=${TEST_PYPI_PASSWORD}
on:
repo: Opentrons/opentrons
branch: edge
# test, build, and upload for JavaScript projects
- stage: test
name: 'JS unit tests; build/deploy Protocol Designer, Components Library'
# node version pulled from .nvmrc
language: node_js
install:
- make install-js
script:
- make test-js
- make lint-js lint-css
- make -C components
- make -C protocol-designer
after_success:
- make coverage
deploy:
- # deploy protocol designer to S3
<<: *deploy_s3
region: us-east-2
dot_match: true
local-dir: protocol-designer/dist
bucket: opentrons-protocol-designer-builds
upload-dir: $TRAVIS_BRANCH
- # deploy components library to S3
<<: *deploy_s3
# TODO(mc, 2018-03-26): why is this region not default?
region: us-west-2
local-dir: components/dist
bucket: opentrons-components
upload-dir: $TRAVIS_BRANCH
# typecheck JavaScript projects
- stage: test
name: 'JS type checks'
language: node_js
install:
- make install-js
script:
- make check-js
- # build the Opentrons App for POSIX (dev branch builds)
<<: *app_stage_build
name: 'Build/deploy Opentrons App for POSIX (unsigned dev builds)'
os: linux
script: make -C app-shell dist-posix
# TODO(mc, 2019-03-07): app-shell makefile still looks for presense of
# tag rather than correct tag format. For now, skip app builds entirely if
# tag is present but does not match ^v
if: tag IS blank AND (NOT branch =~ ^(edge|release_.+)$)
- # build the Opentrons App for Linux (tagged / edge / RC builds)
<<: *app_stage_build
name: 'Build/deploy Opentrons App for Linux'
os: linux
script: make -C app-shell dist-linux
if: tag =~ ^v OR branch =~ ^(edge|release_.+)$
- # build the Opentrons App for macOS (tagged / edge / RC builds)
<<: *app_stage_build
name: 'Build/deploy Opentrons App for macOS'
os: osx
script: make -C app-shell dist-osx
if: tag =~ ^v OR branch =~ ^(edge|release_.+)$
env:
global:
# include $HOME/.local/bin for `aws`
- PYTHONUSERBASE: $HOME/.local
- PATH: $PYTHONUSERBASE/bin:$PATH
- OT_BUILD: $TRAVIS_BUILD_NUMBER
- OT_BRANCH: $TRAVIS_BRANCH
- OT_TAG: $TRAVIS_TAG
- OT_PD_COMMIT_HASH: $TRAVIS_COMMIT
- OT_CI_TEMP_S3_PATH: s3://opentrons-ci/temp/$OT_BUILD
- OT_APP_DEPLOY_BUCKET: opentrons-app
- OT_APP_DEPLOY_FOLDER: builds
# GITHUB_TOKEN
- secure: f/W7kN4gOvVpIanTQh9QtCwiXOk5UrRnUPo2ZU1Qk8zaFVbNj2za2A1xGKMqSyfZKw7guqIwTjWgc/aF9lxRtfU+5fkedJQdxDi5r7jZFxpqmpZOlhyXVY8WAWNqavEkefQInPlpHVAL8M2eV+Pi1cO9FsMhdyy/Wk7qA2nOiA8//9pFRB+0jgSbe1yqIF5DPyL0kbibd3EwmQvuQtnn25qqJXjneenhL6spflLCrnUjq1N/iOlcGd94eBUtk8RaBtMEjOb2D0Mb0DWKMsppoXg4/mZDus6s/PlmBwUJKNCuRtDiEUn5brE14q3OQh/FkDoXMRl69VND2mYp1LOeh5fgLSu6P+YToyHrh4lhXaRAul6l3JmXuoDC3k8hOAr8rPbtiwH7wGY2eRNv59vUejdXof4KHbAN6FTIH934tTe4uvBH79hRMoFY51pHRe6UiC39e/3hwl0pVKLjkV/40wfdEeYA7xhTZQVux+FAfk2krmggokxGEhbAQhWoyRX/wlH2XfEgassGskJ9SbuumNPNOLmEV9OOISFaXoYqVn+SPXy8mN1Pl2sLfaPFtnmmiY20t6yWsHsmfwi+41lv8n0vwCOGq521suDeNyiFhOH2AqG7xm6nHbIv+CiWt2ntKXgV233J17usvfr1zSK07P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