-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
41 lines (35 loc) · 1.2 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:
working_directory: /home/circleci/SummonerExpert
machine:
image: circleci/classic:edge
steps:
# Enables the remote environment necessary for deployment
- checkout
- run:
name: Download DeployManager
command: docker pull danreynolds/deploymanager:0.0.25
- run:
name: Install native libraries
command: sudo apt-get update -qq && sudo apt-get install -y build-essential postgresql libpq-dev
- run:
name: Install dependencies
command: gem install bundler && bundle
- run:
name: Load environment variables
command: touch .env && ./deploymanager "rake secrets:decrypt"
- run:
name: Setup database
command: |
docker-compose -f docker-compose.test.yml run app rake db:setup
docker-compose -f docker-compose.test.yml run app rake db:migrate
- run:
name: Run Tests
command: docker-compose -f docker-compose.test.yml run app rspec
- deploy:
name: Deploy to production
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./deploy.sh
fi