This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
forked from Jostavo/sigla-UFSCar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
78 lines (65 loc) · 2.11 KB
/
config.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
version: 2
jobs:
build:
working_directory: ~/sigla-UFSCar
docker:
- image: circleci/ruby:2.6.3
environment:
PGHOST: 127.0.0.1
RAILS_ENV: development
PGUSER: postgres
POSTGRES_PASSWORD: postgres
- image: circleci/postgres:9.4
environment:
POSTGRES_DB: sigla-test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- checkout
- run:
name: Which bundler?
command: bundle -v
- run:
name: Install environment dependencies
command: sudo apt-get install -y cmake
- restore_cache:
keys:
- v1-dependencies-{{ checksum "Gemfile.lock" }}
- v1-dependencies-
- run:
name: Configure Bundler
command: |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
source $BASH_ENV
gem install bundler
- run:
name: Update Bundle
command: bundle update --bundler
- run:
name: Bundle Install
command: bundle check || bundle install --path vendor/bundle
- save_cache:
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
paths:
- ./vendor/bundle
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load --trace
- run: bundle exec rake db:migrate
- type: shell
name: RSpec
command: bundle exec rspec
- run:
name: Pronto
command: |
export PRONTO_PULL_REQUEST_ID="$(echo $CIRCLE_PULL_REQUEST | grep -o -E '[0-9]+')"
export PRONTO_GITHUB_SLUG="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
export PRONTO_FORMAT="%{msg} [%{runner}:%{level}]"
export PRONTO_VERBOSE=true
bundle exec pronto run -f github_pr github_status -c origin/master
- run:
name: Danger
command: |
bundle exec rake assets:precompile
bundle exec danger
- store_artifacts:
path: tmp/test_results