-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
48 lines (45 loc) · 1.17 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
version: 2
defaults: &defaults
docker:
- image: decidim/decidim:0.19.0-test
environment:
BUNDLE_GEMFILE: /app/Gemfile
SIMPLECOV: true
DATABASE_USERNAME: postgres
FAIL_FAST: true
- image: postgres
environment:
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
working_directory: /app
jobs:
tests:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
- bundler-dependencies-{{ checksum "Gemfile.lock" }}
- run:
name: Install ruby dependencies
command: bundle install --jobs=4 --retry=3
- save_cache:
key: bundler-dependencies-{{ checksum "Gemfile.lock" }}
paths:
- /usr/local/bundle/
- run:
name: Wait for db
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Create test DB
command: RAILS_ENV=test bundle exec rails db:create db:schema:load
- run:
name: Run tests
command: bundle exec rake
- store_artifacts:
path: /app/tmp/capybara
workflows:
version: 2
test:
jobs:
- tests