forked from etalab/udata-gouvfr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
45 lines (44 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
45
machine:
services:
- redis
dependencies:
cache_directories:
- mongodb-linux-x86_64-3.2.4
- elasticsearch-2.4.1
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/mongodb stop
- sudo cp mongodb-linux-x86_64-3.2.4/bin/* /usr/bin
- sudo /etc/init.d/mongodb start
- if [[ ! -d elasticsearch-2.4.1 ]]; then wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-2.4.1.tar.gz && tar xvzf elasticsearch-2.4.1.tar.gz && elasticsearch-2.4.1/bin/plugin install analysis-icu; fi
- elasticsearch-2.4.1/bin/elasticsearch: {background: true}
# Install jq required by circleci-requirements.sh (explanation in file)
- sudo apt-get update && sudo apt-get install jq
override:
- ./circleci-requirements.sh
- nvm use && nvm alias default $(nvm current) && npm install
test:
override:
- mkdir -p $CIRCLE_TEST_REPORTS/{python,karma}
- nosetests --immediate --with-xunit --xunit-file=$CIRCLE_TEST_REPORTS/python/tests.xml udata_gouvfr
post:
# Build a distributable wheel
- 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: etalab
commands:
- pip install twine
- twine upload --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" dist/*.whl
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: etalab
commands:
- pip install twine
- twine upload --username "${PYPI_USERNAME}" --password "${PYPI_PASSWORD}" dist/*.whl