Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hypha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ots
hypha
Commits
95c13a9f
Commit
95c13a9f
authored
6 years ago
by
Fredrik Jonsson
Browse files
Options
Downloads
Patches
Plain Diff
Add circleci config. Makes in run only on the heroku branch for now.
parent
fb53fb4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.circleci/config.yml
+87
-0
87 additions, 0 deletions
.circleci/config.yml
with
87 additions
and
0 deletions
.circleci/config.yml
0 → 100644
+
87
−
0
View file @
95c13a9f
# Python CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-python/ for more details
#
version
:
2
jobs
:
build
:
branches
:
only
:
-
heroku
docker
:
-
image
:
circleci/python:3.6.6-stretch-node
environment
:
DATABASE_URL
:
postgresql://root@localhost/opentech?sslmode=disable
PGHOST
:
localhost
PGUSER
:
root
DJANGO_SETTINGS_MODULE
:
opentech.settings.test
NPM_CONFIG_PRODUCTION
:
false
SEND_MESSAGES
:
false
-
image
:
circleci/postgres:10.5
environment
:
POSTGRES_USER
:
root
POSTGRES_DB
:
opentech
working_directory
:
~/repo
steps
:
-
checkout
# Download and cache dependencies
-
restore_cache
:
keys
:
-
v1-python-{{ .Branch }}-{{ checksum "requirements.txt" }}
-
v1-python-{{ .Branch }}-
-
v1-python-
-
restore_cache
:
keys
:
-
v1-yarn-{{ .Branch }}-{{ checksum "opentech/static_src/yarn.lock" }}
-
v1-yarn-{{ .Branch }}-
-
v1-yarn-
-
run
:
name
:
install dependencies
command
:
|
sudo apt-get install rsync
python3 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
-
run
:
name
:
buils static assets
command
:
|
cd opentech/static_src
yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
npm run build:prod
-
save_cache
:
paths
:
-
./venv
key
:
v1-python-{{ .Branch }}-{{ checksum "requirements.txt" }}
-
save_cache
:
paths
:
-
~/.cache/yarn
key
:
v1-yarn-{{ .Branch }}-{{ checksum "opentech/static_src/yarn.lock" }}
# run tests!
# this example uses Django's built-in test-runner
# other common Python testing frameworks include pytest and nose
# https://pytest.org
# https://nose.readthedocs.io
-
run
:
name
:
run tests
command
:
|
. venv/bin/activate
python manage.py createcachetable
python manage.py collectstatic --no-input
python manage.py migrate
python manage.py test
-
store_artifacts
:
path
:
test-reports
destination
:
test-reports
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment