@@ -25,6 +25,10 @@ test_containers:
25
25
description : Resource class to use
26
26
type : string
27
27
default : medium
28
+ edge :
29
+ description : Use latest version of dependencies during testing
30
+ type : boolean
31
+ default : false
28
32
- &container_base_environment
29
33
BUNDLE_GEMFILE : /app/Gemfile
30
34
JRUBY_OPTS : --dev # Faster JVM startup: https://github.com/jruby/jruby/wiki/Improving-startup-time#use-the---dev-flag
@@ -97,8 +101,27 @@ step_appraisal_install: &step_appraisal_install
97
101
run :
98
102
name : Install Appraisal gems
99
103
command : |
100
- bundle exec appraisal clean # Ensure we fetch the latest version of dependencies
101
104
bundle exec appraisal install
105
+ step_appraisal_update : &step_appraisal_update
106
+ run :
107
+ name : Update Appraisal gems
108
+ command : | # Remove all generated gemfiles and lockfiles, resolve, and install dependencies again
109
+ bundle exec appraisal update
110
+ ensure_lockfile_committed : &ensure_lockfile_committed
111
+ run :
112
+ name : Ensure Gem lock files are commited
113
+ command : |
114
+ CHANGED_FILES=$(git status gemfiles/ --porcelain)
115
+ if [[ $CHANGED_FILES ]]
116
+ then
117
+ >&2 echo "Gem lock files were modified or new lock files were created during"
118
+ >&2 echo "'bundle install' and 'bundle appraisal install' installation in CI."
119
+ >&2 echo "You need to check in those changes in your branch."
120
+ >&2 echo "Affected files:"
121
+ >&2 echo $CHANGED_FILES
122
+ >&2 GIT_PAGER=cat git diff HEAD
123
+ exit 1
124
+ fi
102
125
step_compute_bundle_checksum : &step_compute_bundle_checksum
103
126
run :
104
127
name : Compute bundle checksum
@@ -154,7 +177,18 @@ orbs:
154
177
keys :
155
178
- ' {{ .Environment.CIRCLE_CACHE_VERSION }}-bundle-<<parameters.ruby_version>>-{{ checksum ".circleci/bundle_checksum" }}'
156
179
- *step_bundle_install
157
- - *step_appraisal_install
180
+ - when :
181
+ condition :
182
+ equal : [ << parameters.edge >>, true ]
183
+ steps :
184
+ - *step_appraisal_update # Run on latest version of all gems we integrate with
185
+ - when :
186
+ condition :
187
+ not :
188
+ equal : [ << parameters.edge >>, true ]
189
+ steps :
190
+ - *step_appraisal_install # Run on a stable set of gems we integrate with
191
+ - *ensure_lockfile_committed
158
192
- *step_compute_bundle_checksum
159
193
- save_cache :
160
194
key : ' {{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<<parameters.ruby_version>>-{{ .Environment.CIRCLE_SHA1 }}'
@@ -685,3 +719,176 @@ workflows:
685
719
- test-jruby-9.2.0.0
686
720
- test-jruby-9.2-latest
687
721
# soon™️ - test-truffleruby-21.0.0
722
+ # This workflow runs the same `build` and `test` jobs as above on a schedule.
723
+ # Tasks related to housekeeping (e.g. prerelease) are not relevant
724
+ # to this daily check, as they are not expected to be impacted here.
725
+ edge :
726
+ triggers :
727
+ - schedule :
728
+ cron : " 0 0 * * 1-5" # Every weekday
729
+ filters :
730
+ branches :
731
+ only :
732
+ - master
733
+ jobs :
734
+ # Integration
735
+ - orb/build_and_test_integration :
736
+ name : build_and_test_integration-2.0
737
+ integration_apps : ' ruby rack'
738
+ ruby_version : ' 2.0'
739
+ << : *filters_all_branches_and_tags
740
+ - orb/build_and_test_integration :
741
+ name : build_and_test_integration-2.1
742
+ integration_apps : ' ruby rack'
743
+ ruby_version : ' 2.1'
744
+ << : *filters_all_branches_and_tags
745
+ - orb/build_and_test_integration :
746
+ name : build_and_test_integration-2.2
747
+ integration_apps : ' ruby rack'
748
+ ruby_version : ' 2.2'
749
+ << : *filters_all_branches_and_tags
750
+ - orb/build_and_test_integration :
751
+ name : build_and_test_integration-2.3
752
+ integration_apps : ' ruby rack rails-five'
753
+ ruby_version : ' 2.3'
754
+ << : *filters_all_branches_and_tags
755
+ - orb/build_and_test_integration :
756
+ name : build_and_test_integration-2.4
757
+ integration_apps : ' ruby rack rails-five'
758
+ ruby_version : ' 2.4'
759
+ << : *filters_all_branches_and_tags
760
+ - orb/build_and_test_integration :
761
+ name : build_and_test_integration-2.5
762
+ integration_apps : ' ruby rack rails-five'
763
+ ruby_version : ' 2.5'
764
+ << : *filters_all_branches_and_tags
765
+ - orb/build_and_test_integration :
766
+ name : build_and_test_integration-2.6
767
+ integration_apps : ' ruby rack rails-five'
768
+ ruby_version : ' 2.6'
769
+ << : *filters_all_branches_and_tags
770
+ - orb/build_and_test_integration :
771
+ name : build_and_test_integration-2.7
772
+ integration_apps : ' ruby rack rails-five'
773
+ ruby_version : ' 2.7'
774
+ << : *filters_all_branches_and_tags
775
+ - orb/build_and_test_integration :
776
+ name : build_and_test_integration-3.0
777
+ # TODO: Get Rack & Rails apps working with Ruby 3.0
778
+ integration_apps : ' ruby'
779
+ ruby_version : ' 3.0'
780
+ << : *filters_all_branches_and_tags
781
+ # MRI
782
+ - orb/build :
783
+ << : *config-2_0
784
+ name : build-2.0
785
+ edge : true
786
+ - orb/test :
787
+ << : *config-2_0
788
+ name : test-2.0
789
+ requires :
790
+ - build-2.0
791
+ - orb/build :
792
+ << : *config-2_1
793
+ name : build-2.1
794
+ - orb/test :
795
+ << : *config-2_1
796
+ name : test-2.1
797
+ requires :
798
+ - build-2.1
799
+ - orb/build :
800
+ << : *config-2_2
801
+ name : build-2.2
802
+ - orb/test :
803
+ << : *config-2_2
804
+ name : test-2.2
805
+ requires :
806
+ - build-2.2
807
+ - orb/build :
808
+ << : *config-2_3
809
+ name : build-2.3
810
+ - orb/test :
811
+ << : *config-2_3
812
+ name : test-2.3
813
+ requires :
814
+ - build-2.3
815
+ - orb/benchmark :
816
+ << : *config-2_3
817
+ name : benchmark-2.3
818
+ requires :
819
+ - build-2.3
820
+ - orb/build :
821
+ << : *config-2_4
822
+ name : build-2.4
823
+ - orb/test :
824
+ << : *config-2_4
825
+ name : test-2.4
826
+ requires :
827
+ - build-2.4
828
+ - orb/build :
829
+ << : *config-2_5
830
+ name : build-2.5
831
+ - orb/test :
832
+ << : *config-2_5
833
+ name : test-2.5
834
+ requires :
835
+ - build-2.5
836
+ - orb/build :
837
+ << : *config-2_6
838
+ name : build-2.6
839
+ - orb/test :
840
+ << : *config-2_6
841
+ name : test-2.6
842
+ requires :
843
+ - build-2.6
844
+ - orb/build :
845
+ << : *config-2_7
846
+ name : build-2.7
847
+ - orb/test :
848
+ << : *config-2_7
849
+ name : test-2.7
850
+ requires :
851
+ - build-2.7
852
+ - orb/build :
853
+ << : *config-3_0
854
+ name : build-3.0
855
+ - orb/test :
856
+ << : *config-3_0
857
+ name : test-3.0
858
+ requires :
859
+ - build-3.0
860
+ - orb/build :
861
+ << : *config-3_0-jit
862
+ name : build-3.0-jit
863
+ - orb/test :
864
+ << : *config-3_0-jit
865
+ name : test-3.0-jit
866
+ requires :
867
+ - build-3.0-jit
868
+ # JRuby
869
+ - orb/build :
870
+ << : *config-jruby-9_2_0_0
871
+ name : build-jruby-9.2.0.0
872
+ - orb/test :
873
+ << : *config-jruby-9_2_0_0
874
+ name : test-jruby-9.2.0.0
875
+ requires :
876
+ - build-jruby-9.2.0.0
877
+ - orb/build :
878
+ << : *config-jruby-9_2-latest
879
+ name : build-jruby-9.2-latest
880
+ - orb/test :
881
+ << : *config-jruby-9_2-latest
882
+ name : test-jruby-9.2-latest
883
+ requires :
884
+ - build-jruby-9.2-latest
885
+ # TruffleRuby
886
+ # soon™️
887
+ # - orb/build:
888
+ # <<: *config-truffleruby-21_0_0
889
+ # name: build-truffleruby-21.0.0
890
+ # - orb/test:
891
+ # <<: *config-truffleruby-21_0_0
892
+ # name: test-truffleruby-21.0.0
893
+ # requires:
894
+ # - build-truffleruby-21.0.0
0 commit comments