Skip to content

Commit de32b0c

Browse files
authored
Use CircleCI workflows (#35)
Improves feedback in checks UI
1 parent e8c7442 commit de32b0c

File tree

1 file changed

+55
-3
lines changed

1 file changed

+55
-3
lines changed

.circleci/config.yml

Lines changed: 55 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,39 @@
11
version: 2.1
22

33
jobs:
4-
build:
4+
bundle:
55
docker:
6-
- image: circleci/ruby:2.6.6
6+
- image: circleci/ruby:2.7.1
77
working_directory: /mnt/ramdisk
88
steps:
99
- checkout
10-
- run: bundle install
10+
- restore_cache:
11+
keys:
12+
- bundler-{{ checksum "diffcrypt.gemspec" }}-{{ .Environment.CACHE_VERSION }}
13+
- run:
14+
name: bundle install
15+
command: |
16+
gem install bundler -v '2.1.4'
17+
bundle install --path=vendor/bundle --jobs=4 --retry=3
18+
- save_cache:
19+
key: bundler-{{ checksum "diffcrypt.gemspec" }}-{{ .Environment.CACHE_VERSION }}
20+
paths:
21+
- vendor/bundle
22+
23+
test:
24+
docker:
25+
- image: circleci/ruby:2.7.1
26+
working_directory: /mnt/ramdisk
27+
steps:
28+
- checkout
29+
- restore_cache:
30+
keys:
31+
- bundler-{{ checksum "diffcrypt.gemspec" }}-{{ .Environment.CACHE_VERSION }}
32+
- run:
33+
name: bundle install
34+
command: |
35+
gem install bundler -v '2.1.4'
36+
bundle install --path=vendor/bundle --jobs=4 --retry=3
1137
- run:
1238
name: Setup Code Climate test-reporter
1339
command: |
@@ -20,7 +46,33 @@ jobs:
2046
./cc-test-reporter before-build
2147
bundle exec rake test
2248
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
49+
rubocop:
50+
docker:
51+
- image: circleci/ruby:2.7.1
52+
working_directory: /mnt/ramdisk
53+
steps:
54+
- checkout
55+
- restore_cache:
56+
keys:
57+
- bundler-{{ checksum "diffcrypt.gemspec" }}-{{ .Environment.CACHE_VERSION }}
58+
- run:
59+
name: bundle install
60+
command: |
61+
gem install bundler -v '2.1.4'
62+
bundle install --path=vendor/bundle --jobs=4 --retry=3
2363
- run:
2464
name: rubocop
2565
command: bundle exec rubocop
2666
when: always
67+
68+
workflows:
69+
version: 2
70+
all:
71+
jobs:
72+
- bundle
73+
- test:
74+
requires:
75+
- bundle
76+
- rubocop:
77+
requires:
78+
- bundle

0 commit comments

Comments
 (0)