forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
170 lines (149 loc) · 3.68 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: 2.1
executors:
base:
working_directory: &workdir ~/solidus
environment: &environment
DEFAULT_MAX_WAIT_TIME: 10
SOLIDUS_RAISE_DEPRECATIONS: true
CIRCLE_TEST_REPORTS: /tmp/test-results
CIRCLE_ARTIFACTS: /tmp/test-artifacts
docker:
- image: &image circleci/ruby:2.7-node-browsers
postgres:
working_directory: *workdir
environment:
<<: *environment
DB: postgresql
DB_HOST: localhost
docker:
- image: *image
- image: jhawthorn/circleci-postgres-fast
environment:
POSTGRES_USER: root
mysql:
working_directory: *workdir
environment:
<<: *environment
DB: mysql
DB_HOST: 127.0.0.1
DB_USERNAME: root
docker:
- image: *image
- image: circleci/mysql:5.7-ram
commands:
setup:
steps:
- run: .circleci/bin/halt-for-doc-only-changes.sh && circleci step halt || true # skip Circle for guides
- checkout
- run: |
gem install bundler -v"~> 2.1" --conservative
bundle lock
- restore_cache:
keys:
- solidus-gems-v3-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- solidus-gems-v3-{{ .Branch }}
- solidus-gems-v3-master
- solidus-gems-v3
- run: |
bundle config set path 'vendor/bundle'
bundle check || bundle install
bundle clean
- save_cache:
key: solidus-gems-v3-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
paths:
- vendor/bundle
test:
steps:
- run:
name: Run Tests
command: ./bin/build-ci test
- store_artifacts:
path: /tmp/test-artifacts
destination: test-artifacts
- store_artifacts:
path: /tmp/test-results
destination: raw-test-output
- store_test_results:
path: /tmp/test-results
# TODO: Integrate with `setup` when we deprecate support for Rails 6.1 (vips is the default from Rails 7)
libvips:
steps:
- run:
name: Install libvips
command: sudo apt-get install -y libvips
jobs:
persist_version:
executor: base
steps:
- setup
- run:
name: Persist Solidus version
command: |
mkdir -p workspace
bundle exec ruby -e "puts Spree.solidus_gem_version.segments[0..1].join('.')" > workspace/solidus-version
- persist_to_workspace:
root: workspace
paths:
- solidus-version
postgres:
executor: postgres
parallelism: ¶llelism 3
steps:
- setup
- libvips
- test
legacy_events:
executor: postgres
parallelism: ¶llelism
environment:
USE_LEGACY_EVENTS: '1'
steps:
- setup
- libvips
- test
mysql:
executor: mysql
parallelism: *parallelism
steps:
- setup
- libvips
- test
postgres_rails61:
executor: postgres
parallelism: *parallelism
environment:
RAILS_VERSION: '~> 6.1.0'
steps:
- setup
- test
postgres_rails60:
executor: postgres
parallelism: *parallelism
environment:
RAILS_VERSION: '~> 6.0.0'
DISABLE_ACTIVE_STORAGE: true
steps:
- setup
- test
postgres_rails52:
executor: postgres
parallelism: *parallelism
environment:
RAILS_VERSION: '~> 5.2.0'
DISABLE_ACTIVE_STORAGE: true
steps:
- setup
- test
workflows:
build:
jobs:
- persist_version:
filters:
branches:
only: /master|v\d\.\d+/
- postgres
- mysql
- postgres_rails61
- postgres_rails60
- postgres_rails52
- legacy_events