Skip to content

Add .circleci/config.yml #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 9 additions & 78 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,13 @@
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1

#########
# Common
#########
# Use a package of configuration called an orb.
orbs:
heroku: circleci/heroku@1.0.1

############
# Workflows
############
# Declare a dependency on the welcome-orb
welcome: circleci/welcome-orb@0.4.1
# Orchestrate or schedule a set of jobs
workflows:
version: 2
build-deploy:
# Name the workflow "welcome"
welcome:
# Run the welcome/run job in its own container
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master

##################
# Job Definitions
##################
jobs:
build:
docker:
- image: circleci/python:3.6.2-stretch-browsers
environment:
FLASK_CONFIG: testing
TEST_DATABASE_URL: postgresql://ubuntu@localhost/circle_test?sslmode=disable
- image: circleci/postgres:9.6.5-alpine-ram
environment:
POSTGRES_USER: ubuntu
POSTGRES_DB: circle_test
POSTGRES_PASSWORD: ''
steps:
- checkout
- run: mkdir test-reports
- run:
name: Download Selenium
command: |
curl -O http://selenium-release.storage.googleapis.com/3.5/selenium-server-standalone-3.5.3.jar
- run:
name: Start Selenium
command: |
java -jar selenium-server-standalone-3.5.3.jar -log test-reports/selenium.log
background: true
- restore_cache:
key: deps2-{{ checksum "requirements/dev.txt" }}
- run:
command: |
python3 -m venv venv
. venv/bin/activate
pip install -r requirements/dev.txt
- save_cache:
key: deps2-{{ checksum "requirements/dev.txt" }}
paths:
- 'venv'
- run:
command: |
. venv/bin/activate
python manage.py test
- store_artifacts:
path: test-reports/
destination: tr1
- store_test_results:
path: test-reports/

deploy:
executor: heroku/default
steps:
- checkout
- add_ssh_keys:
fingerprints:
- '48:a0:87:54:ca:75:32:12:c6:9e:a2:77:a4:7a:08:a4'
- heroku/install
- heroku/deploy-via-git:
force: true

- welcome/run