This repository has been archived by the owner on Jun 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
circle.yml
72 lines (64 loc) · 2.14 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
63
64
65
66
67
68
69
70
71
72
version: 2
jobs:
build:
parallelism: 3
working_directory: ~/just_match
docker:
- image: circleci/ruby:2.5.3-node
environment:
PGHOST: 127.0.0.1
PGUSER: just_match
RAILS_ENV: test
CIRCLE_CI: true
LINT_FACTORY: true
AIRBRAKE_PROJECT_ID: 123456
AIRBRAKE_API_KEY: notsosecret
FRILANS_FINANS_BASE_URI: 'https://example.com'
FRILANS_FINANS_CLIENT_ID: 123456
FRILANS_FINANS_CLIENT_SECRET: notsosecret
TWILIO_ACCOUNT_SID: XYZ
TWILIO_AUTH_TOKEN: notsosecret
TWILIO_NUMBER: '+46735000000'
GOOGLE_TRANSLATE_API_KEY: XYZ
RUN_NESTED_GEMS_SPECS: true
RAILS_EAGER_LOAD_IN_TEST: true
DISABLE_SPRING: 1
LINT_FACTORY: false
RUBOCOP: false
CHECK_DB_INDEXES: false
CHECK_DB_UNIQ_INDEXES: false
- image: circleci/postgres:9.5-alpine
environment:
POSTGRES_USER: just_match
POSTGRES_DB: just_match_test
POSTGRES_PASSWORD: ""
steps:
- checkout
# Restore bundle cache
- restore_cache:
keys:
- gem-cache-{{ checksum "Gemfile.lock" }}
# Bundle install dependencies
- run: bundle install --path vendor/bundle
# Store bundle cache
- save_cache:
key: gem-cache-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
- run:
name: Wait for database
command: dockerize -wait tcp://localhost:5432 -timeout 1m
# Database setup
- run: bundle exec rake db:create
- run: bundle exec rake db:schema:load
# Run rspec in parallel
- type: shell
command: |
bundle exec rspec --profile 10 \
--format RspecJunitFormatter \
--out test_results/rspec.xml \
--format progress \
$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)
# Save test results for timing analysis
- store_test_results:
path: test_results