1
- # Ruby CircleCI 2.0 configuration file
2
- #
3
- # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
- #
5
1
version : 2
6
2
jobs :
7
3
build :
8
- docker :
9
- # specify the version you desire here
10
- - image : circleci/ruby:2.5-node-browsers
11
-
12
- # Specify service dependencies here if necessary
13
- # CircleCI maintains a library of pre-built images
14
- # documented at https://circleci.com/docs/2.0/circleci-images/
15
- # - image: circleci/postgres:9.4
16
-
17
- working_directory : ~/repo
18
-
19
4
steps :
20
5
- checkout
21
-
22
- # Download and cache dependencies
23
- - restore_cache :
24
- keys :
25
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
26
- # fallback to using the latest cache if no exact match is found
27
- - v1-dependencies-
28
-
6
+ - setup_remote_docker
29
7
- run :
30
- name : Get newest bundler
31
- command : gem install bundler
32
-
33
- - run :
34
- name : install dependencies
35
- command : |
36
- bundle install --jobs=4 --retry=3 --path vendor/bundle
37
-
38
- - save_cache :
39
- paths :
40
- - ./vendor/bundle
41
- key : v1-dependencies-{{ checksum "Gemfile.lock" }}
42
-
43
- # Yarn Update
44
-
45
- - run : yarn install
46
- - run : cd spec/dummy
47
- - run : yarn install
48
-
49
- # Database setup
50
- - run : bundle exec rake db:create
51
- - run : bundle exec rake db:schema:load
52
-
53
- # run tests!
54
- - run :
55
- name : run tests
8
+ name : Run tests
56
9
command : |
57
- mkdir /tmp/test-results
58
- TEST_FILES="$(circleci tests glob "spec/usage/**/*_spec.rb" "spec/matestack/**/*_spec.rb" | circleci tests split --split-by=timings)"
59
-
60
- bundle exec rspec --format progress \
61
- --out /tmp/test-results/rspec.xml \
62
- --format progress \
63
- $TEST_FILES
64
-
65
- # collect reports
66
- - store_test_results :
67
- path : /tmp/test-results
68
- - store_artifacts :
69
- path : /tmp/test-results
70
- destination : test-results
10
+ docker-compose run --rm test bundle exec rake db:schema:load
11
+ docker-compose run --rm test bundle exec rspec spec/usage
0 commit comments