forked from hotosm/tasking-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
59 lines (59 loc) · 1.92 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: 2
jobs:
build:
working_directory: /app
docker:
- image: python:3.6
steps:
- checkout
- setup_remote_docker
- run:
name: Install dependencies
command: |
# Install latest LTS node
apt-get update
curl -sL https://deb.nodesource.com/setup_6.x | bash -
apt-get install -y nodejs libgeos-c1 libgeos-dev # Required for shapely
node --version
- restore_cache:
keys:
- cached-directories
paths:
- /app/client/node_modules
- /app/env
- run:
name: Install requirements
command: |
# Install NPM packages and build client from gulpfile
cd /app/client
npm install
./node_modules/.bin/gulp build
cd /app
# Install Python dependencies
pip install virtualenv
virtualenv env
/app/env/bin/pip install --upgrade pip
/app/env/bin/pip install -r requirements.txt
- run:
name: Run tests
command: |
# JS Unit Tests
cd /app/tests/client
../../client/node_modules/.bin/karma start ./karma.conf.js \
--single-run --browsers PhantomJS --reporters junit
# Run Python tests
cd /app
env/bin/nosetests ./tests/server --with-xunit \
--xunit-file $CIRCLE_TEST_REPORTS/unitresults.xml \
--with-coverage --cover-erase --cover-package=./server
env/bin/coverage xml -o $CIRCLE_TEST_REPORTS/coverage.xml
- save_cache:
key: cached-directories
paths:
- /app/client/node_modules
- /app/env
- deploy:
name: Deploy application
command: |
chmod +x /app/devops/ci/circleci_deploy.sh
/app/devops/ci/circleci_deploy.sh