Skip to content

Commit 278c8c9

Browse files
authored
Use circle2 for builds (#390)
* Use circle2 for builds * install node * posgres * use sqllite3 * add python-version file * remove parallel * remove sudo
1 parent 6e27522 commit 278c8c9

File tree

5 files changed

+35
-44
lines changed

5 files changed

+35
-44
lines changed

Diff for: .circleci/config.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/orchestra
5+
docker:
6+
- image: python:3.5.2
7+
steps:
8+
- checkout
9+
- run:
10+
name: Install dependencies
11+
command: |
12+
curl -sL https://deb.nodesource.com/setup_7.x | bash - && apt-get install -y nodejs
13+
npm install -g gulp
14+
npm install
15+
# circle has a really old version of pip by default which seems to break
16+
# builds sometimes.
17+
pip install --upgrade pip
18+
pip install -r requirements.txt
19+
pip install coveralls
20+
- run:
21+
name: Run tests
22+
command: |
23+
make lint
24+
make coverage
25+
make coveralls
26+
# Circle uses XUnit reports
27+
mkdir -p $CIRCLE_TEST_REPORTS/python/
28+
find . -wholename *nosetests.xml -exec mv {} $CIRCLE_TEST_REPORTS/python/ \;

Diff for: .python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.5.2

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
COVERAGE_ANNOTATION=coverage_annotations
2-
TEST_CMD=manage.py test orchestra beanstalk_dispatch --with-xunit --parallel=4 --exclude=assert_test*
2+
TEST_CMD=manage.py test orchestra beanstalk_dispatch --with-xunit --exclude=assert_test*
33
GULP := $(shell command -v gulp 2> /dev/null)
44

55
clean:

Diff for: circle.yml

-23
This file was deleted.

Diff for: example_project/example_project/settings.py

+5-20
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
# SECURITY WARNING: don't run with debug turned on in production!
2727
DEBUG = True
2828

29-
# Determine whether we're running on CircleCI or not
30-
RUNNING_ON_CIRCLE = bool(os.environ.get('CIRCLE_SHA1'))
31-
3229
# Application definition
3330
INSTALLED_APPS = (
3431
'django.contrib.auth',
@@ -93,24 +90,12 @@
9390

9491
# Database
9592
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
96-
if RUNNING_ON_CIRCLE:
97-
DATABASES = {
98-
'default': {
99-
'ENGINE': 'django.db.backends.postgresql_psycopg2',
100-
'NAME': 'circle_test',
101-
'USER': 'ubuntu',
102-
'PASSWORD': '',
103-
'HOST': 'localhost',
104-
'PORT': '5432',
105-
}
106-
}
107-
else:
108-
DATABASES = {
109-
'default': {
110-
'ENGINE': 'django.db.backends.sqlite3',
111-
'NAME': 'orchestra.sqlite3',
112-
}
93+
DATABASES = {
94+
'default': {
95+
'ENGINE': 'django.db.backends.sqlite3',
96+
'NAME': 'orchestra.sqlite3',
11397
}
98+
}
11499

115100
# Internationalization
116101
# https://docs.djangoproject.com/en/1.9/topics/i18n/

0 commit comments

Comments
 (0)