1
1
version : 2.1
2
2
jobs :
3
3
lint :
4
- docker :
5
- - image : cimg/ruby:2.7.7
6
- working_directory : ~/delayed_job_heartbeat_plugin
7
- steps :
8
- - checkout
9
- - restore_cache :
10
- keys :
11
- - v1-gems-ruby-2.7.7-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "Gemfile" }}
12
- - v1-gems-ruby-2.7.7-
13
- - run :
14
- name : Install Gems
15
- command : |
16
- if ! bundle check --path=vendor/bundle; then
17
- bundle install --path=vendor/bundle --jobs=4 --retry=3
18
- bundle clean
19
- fi
20
- - save_cache :
21
- key : v1-gems-ruby-2.7.7-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "Gemfile" }}
22
- paths :
23
- - " vendor/bundle"
24
- - " gemfiles/vendor/bundle"
25
- - run :
26
- name : Run Rubocop
27
- command : bundle exec rubocop --config .rubocop.yml
4
+ docker :
5
+ - image : cimg/ruby:2.7.7
6
+ working_directory : ~/delayed_job_heartbeat_plugin
7
+ steps :
8
+ - checkout
9
+ - restore_cache :
10
+ keys :
11
+ - v1-gems-ruby-2.7.7-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "Gemfile" }}
12
+ - v1-gems-ruby-2.7.7-
13
+ - run :
14
+ name : Install Gems
15
+ command : |
16
+ if ! bundle check --path=vendor/bundle; then
17
+ bundle install --path=vendor/bundle --jobs=4 --retry=3
18
+ bundle clean
19
+ fi
20
+ - save_cache :
21
+ key : v1-gems-ruby-2.7.7-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "Gemfile" }}
22
+ paths :
23
+ - " vendor/bundle"
24
+ - " gemfiles/vendor/bundle"
25
+ - run :
26
+ name : Run Rubocop
27
+ command : bundle exec rubocop --config .rubocop.yml
28
28
test :
29
- parameters :
30
- gemfile :
31
- type : string
32
- ruby_version :
33
- type : string
34
- docker :
35
- - image : cimg/ruby:<< parameters.ruby_version >>
36
- environment :
37
- DB_USER : " circleci"
38
- - image : cimg/postgres:12.9
39
- environment :
40
- POSTGRES_USER : " circleci"
41
- POSTGRES_DB : " circle_test"
42
- POSTGRES_HOST_AUTH_METHOD : " trust"
43
- environment :
44
- RACK_ENV : " test"
45
- RAILS_ENV : " test"
46
- DB_USER : " circleci"
47
- ADMIN_DB_NAME : " circle_test"
48
- CIRCLE_TEST_REPORTS : " test-results"
49
- BUNDLE_GEMFILE : << parameters.gemfile >>
50
- working_directory : ~/delayed_job_heartbeat_plugin
51
- steps :
52
- - checkout
53
- - restore_cache :
54
- keys :
55
- - v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
56
- - v1-gems-ruby-<< parameters.ruby_version >>-
57
- - run :
58
- name : Install Gems
59
- command : |
60
- if ! bundle check --path=vendor/bundle; then
61
- bundle install --path=vendor/bundle --jobs=4 --retry=3
62
- bundle clean
63
- fi
64
- - save_cache :
65
- key : v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
66
- paths :
67
- - " vendor/bundle"
68
- - " gemfiles/vendor/bundle"
69
- - run :
70
- name : Wait for Database
71
- command : dockerize -wait tcp://localhost:5432 -timeout 60s
72
- - run :
73
- name : Wait for Database User
74
- command : t=30; for i in `seq $t`; do psql -h localhost -p 5432 -U circleci -d circle_test -c '\q' && break; [ $i -eq $t ] && return 2; sleep 1; done;
75
- - run :
76
- name : Run Tests
77
- command : |
78
- bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
79
- - store_test_results :
80
- path : " test-results"
29
+ parameters :
30
+ gemfile :
31
+ type : string
32
+ ruby_version :
33
+ type : string
34
+ docker :
35
+ - image : cimg/ruby:<< parameters.ruby_version >>
36
+ environment :
37
+ DB_USER : " circleci"
38
+ - image : cimg/postgres:12.9
39
+ environment :
40
+ POSTGRES_USER : " circleci"
41
+ POSTGRES_DB : " circle_test"
42
+ POSTGRES_HOST_AUTH_METHOD : " trust"
43
+ environment :
44
+ RACK_ENV : " test"
45
+ RAILS_ENV : " test"
46
+ DB_USER : " circleci"
47
+ ADMIN_DB_NAME : " circle_test"
48
+ CIRCLE_TEST_REPORTS : " test-results"
49
+ BUNDLE_GEMFILE : << parameters.gemfile >>
50
+ working_directory : ~/delayed_job_heartbeat_plugin
51
+ steps :
52
+ - checkout
53
+ - restore_cache :
54
+ keys :
55
+ - v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
56
+ - v1-gems-ruby-<< parameters.ruby_version >>-
57
+ - run :
58
+ name : Install Gems
59
+ command : |
60
+ if ! bundle check --path=vendor/bundle; then
61
+ bundle install --path=vendor/bundle --jobs=4 --retry=3
62
+ bundle clean
63
+ fi
64
+ - save_cache :
65
+ key : v1-gems-ruby-<< parameters.ruby_version >>-{{ checksum "delayed_job_heartbeat_plugin.gemspec" }}-{{ checksum "<< parameters.gemfile >>" }}
66
+ paths :
67
+ - " vendor/bundle"
68
+ - " gemfiles/vendor/bundle"
69
+ - run :
70
+ name : Wait for Database
71
+ command : dockerize -wait tcp://localhost:5432 -timeout 60s
72
+ - run :
73
+ name : Wait for Database User
74
+ command : t=30; for i in `seq $t`; do psql -h localhost -p 5432 -U circleci -d circle_test -c '\q' && break; [ $i -eq $t ] && return 2; sleep 1; done;
75
+ - run :
76
+ name : Run Tests
77
+ command : |
78
+ bundle exec rspec --format RspecJunitFormatter --out $CIRCLE_TEST_REPORTS/rspec/junit.xml --format progress spec
79
+ - store_test_results :
80
+ path : " test-results"
81
81
workflows :
82
82
build :
83
83
jobs :
@@ -86,11 +86,12 @@ workflows:
86
86
matrix :
87
87
parameters :
88
88
gemfile :
89
- - " gemfiles/rails_6.0.gemfile"
90
- - " gemfiles/rails_6.1.gemfile"
91
- - " gemfiles/rails_7.0.gemfile"
89
+ - gemfiles/rails_6.0.gemfile
90
+ - gemfiles/rails_6.1.gemfile
91
+ - gemfiles/rails_7.0.gemfile
92
92
ruby_version :
93
- - " 2.7.7"
94
- - " 3.0.5"
95
- - " 3.1.3"
96
- - " 3.2.0"
93
+ - 2.7.7
94
+ - 3.0.5
95
+ - 3.1.3
96
+ - 3.2.0
97
+ - 3.3.0
0 commit comments