-
Notifications
You must be signed in to change notification settings - Fork 968
/
config.yml
118 lines (108 loc) · 2.54 KB
/
config.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: 2.1
# Share Steps: glued in using the YAML alias
# See https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
shared_ruby_steps: &shared_ruby_steps
parameters:
run-cc-reporter:
type: boolean
default: false
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- "{{ .Environment.CACHE_KEY_PREFIX }}-v1-bundler-deps-{{ .Branch }}"
- run:
name: Bundle Install
command: bundle install --path vendor/bundle --jobs 7 --retry 15
- run: mkdir -p ~/test-results/rspec
- run:
name: Run tests
command: bundle exec rake test
- save_cache:
key: "{{ .Environment.CACHE_KEY_PREFIX }}-v1-bundler-deps-{{ .Branch }}"
paths:
- ./vendor/bundle
- store_test_results:
path: ~/test-results/rspec
- store_artifacts:
path: ./Gemfile.lock
- persist_to_workspace:
root: .
paths:
- ./vendor/bundle
jobs:
checkout_code:
docker:
- image: circleci/ruby:2.6
steps:
- checkout
- persist_to_workspace:
root: .
paths:
- .
ruby26:
docker:
- image: circleci/ruby:2.6
<<: *shared_ruby_steps
ruby25:
docker:
- image: circleci/ruby:2.5
<<: *shared_ruby_steps
ruby24:
docker:
- image: circleci/ruby:2.4
<<: *shared_ruby_steps
ruby23:
docker:
- image: circleci/ruby:2.3
<<: *shared_ruby_steps
# Currently not in use
jruby92:
docker:
- image: circleci/jruby:9.2
environment:
JRUBY_OPTS: "--debug"
<<: *shared_ruby_steps
deploy:
docker:
- image: circleci/ruby:2.6
steps:
- checkout
- run:
name: Setup Rubygems
command: bash .circleci/setup-rubygems.sh
- run:
name: Publish to Rubygems
command: |
gem build faraday.gemspec
gem push "faraday-$(git describe --tags).gem"
workflows:
version: 2
test:
jobs:
- checkout_code
- ruby26:
requires:
- checkout_code
run-cc-reporter: true
- ruby25:
requires:
- checkout_code
- ruby24:
requires:
- checkout_code
- ruby23:
requires:
- checkout_code
- deploy:
requires:
- ruby23
- ruby24
- ruby25
- ruby26
filters:
tags:
only: /.*/
branches:
ignore: /.*/