Skip to content

Commit b553ff5

Browse files
committed
first try to run dockerized test suite on circle ci
1 parent 13c3520 commit b553ff5

File tree

1 file changed

+4
-63
lines changed

1 file changed

+4
-63
lines changed

.circleci/config.yml

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,11 @@
1-
# Ruby CircleCI 2.0 configuration file
2-
#
3-
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
4-
#
51
version: 2
62
jobs:
73
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-
194
steps:
205
- 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
297
- 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
569
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

Comments
 (0)