This repository has been archived by the owner on Aug 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
62 lines (62 loc) · 1.93 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: 2
jobs:
rails-test-suite:
docker:
- image: ruby:2.3.1
environment:
RAILS_ENV: test
DATABASE_URL: postgis://root@localhost/tpp_datastore_test
- image: mdillon/postgis:9.5
environment:
POSTGRES_USER: root
POSTGRES_DB: tpp_datastore_test
steps:
- checkout
- restore_cache:
keys:
- tpp-datastore-{{ checksum "Gemfile.lock" }}
- tpp-datastore-
- run:
name: Install dependencies
command: apt-get update -qq && apt-get install -y libgeos-dev libproj-dev
- run:
name: Install bundle
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3
- save_cache:
key: tpp-datastore-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Database setup
command: bundle exec rake db:drop db:create db:schema:load
- run:
name: Run tests
command: bundle exec rake
# - run:
# name: Run profile
# command: mkdir -p $CIRCLE_ARTIFACTS/profiling && bundle exec rake profile:import:nycdot[$CIRCLE_ARTIFACTS/profiling]
build-container-image:
docker:
- image: circleci/buildpack-deps:16.04-curl
steps:
- checkout
- run: sudo apt-get update -qq && sudo apt-get install python-pip python-dev -y
- setup_remote_docker
- run: docker build -t tpp_banco_de_dados:${CIRCLE_TAG:-$CIRCLE_BRANCH} .
- run: docker tag tpp_banco_de_dados:${CIRCLE_TAG:-$CIRCLE_BRANCH}
workflows:
version: 2
test-and-build-workflow:
jobs:
- rails-test-suite:
filters:
tags:
only: /.*/
- build-container-image:
requires:
- rails-test-suite
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/