This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
forked from opendatateam/udata
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
44 lines (43 loc) · 1.83 KB
/
circle.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
machine:
services:
- redis
dependencies:
cache_directories:
- mongodb-linux-x86_64-3.2.4
- elasticsearch-2.4.5
pre:
- if [[ ! -d mongodb-linux-x86_64-3.2.4 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.2.4.tgz && tar xvzf mongodb-linux-x86_64-3.2.4.tgz; fi
- sudo /etc/init.d/mongod stop
- sudo cp mongodb-linux-x86_64-3.2.4/bin/* /usr/bin
- sudo /etc/init.d/mongod start
- if [[ ! -d elasticsearch-2.4.5 ]]; then wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.4.5.tar.gz && tar xvzf elasticsearch-2.4.5.tar.gz && elasticsearch-2.4.5/bin/plugin install analysis-icu; fi
- elasticsearch-2.4.5/bin/elasticsearch: {background: true}
override:
- pip install -e . -r requirements/circleci.pip
- nvm install && nvm alias default $(nvm current) && npm install
test:
override:
- mkdir -p $CIRCLE_TEST_REPORTS/{python,karma}
- nosetests --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/python/tests.xml udata
- nvm use; REPORT_DIR=$CIRCLE_TEST_REPORTS/karma npm -s run test:unit -- --reporters mocha,junit
post:
# Build a distributable wheel
- nvm use && if [[ $CIRCLE_TAG ]]; then inv dist; else inv dist -b $CIRCLE_BUILD_NUM; fi
# Expose result as build artifact
- cp dist/*.whl $CIRCLE_ARTIFACTS/
# Secure PyPI upload
# - use Twine (as recommanded) to upload the built package
# - use environement variables declared on CircleCI webui
deployment:
builds:
branch: [master, dev]
owner: opendatateam
commands:
- pip install twine
- twine upload --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" dist/*.whl
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: opendatateam
commands:
- pip install twine
- twine upload --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" dist/*.whl