-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
41 lines (41 loc) · 1.34 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
version: 2
jobs:
build:
docker:
- image: dstancu/ruby-240-pocketsphinx
environment:
KARAFKA_ENV: production
RAILS_ENV: production
DATABASE_URL: postgresql://postgres:@127.0.0.1/talkbirdy_test
- image: postgres:9.6.2
environment:
POSTGRES_USER: postgres
POSTGRES_DB: talkbirdy_test
POSTGRES_PASSWORD: ""
steps:
- checkout
- run:
name: Install Bundler
command: gem install bundler; bundle install;
- run:
name: Seed database
command: |
git clone https://github.com/awesomeit/kagu kagu;
cd kagu; bundle; bundle exec rake db:reset DISABLE_DATABASE_ENVIRONMENT_CHECK=1;
- run:
name: Rubocop
command: bundle exec rubocop
- run:
name: RSpec
command: |
bundle exec rspec;
bundle exec codeclimate-test-reporter;
- setup_remote_docker
- run:
name: Deploy to Heroku (if master)
command: |
if [ $CIRCLE_BRANCH = 'master' ]; then
heroku plugins:install heroku-container-registry;
docker login --email=_ --username=_ --password=${NOT_DOCKER_HEROKU_API_KEY} registry.heroku.com;
heroku container:push worker -a talkbirdy-myna;
fi