forked from ma2shita/mail_ja
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathtest_2_1_0.sh
50 lines (38 loc) · 1.3 KB
/
test_2_1_0.sh
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
#!/bin/bash
#
# rbenv version
set -e
source /usr/local/share/chruby/chruby.sh
RUBIES=(~/.rbenv/versions/* ~/.rubies/*)
function run_for_2_1_0 {
chruby $RUBY_VERSION
for version in 2.7.1 2.8.0 2.8.1; do
echo "Running bundle exec ruby test/mail_test.rb against mail $version using $RUBY_VERSION..."
rm -f Gemfile.lock
MAIL_GEM_VERSION=$version bundle install
MAIL_GEM_VERSION=$version bundle exec ruby -Itest test/mail_test.rb
done
gem list --local bundler | grep bundler || gem install bundler --no-ri --no-rdoc
RAILS_VERSIONS=(6.1.7.8)
for version in ${RAILS_VERSIONS[@]}; do
for mail_gem_version in 2.7.1 2.8.0 2.8.1; do
rm -f Gemfile.lock
echo "Running bundle exec rspec spec against actionmailer $version using $RUBY_VERSION..."
MAIL_GEM_VERSION=$mail_gem_version MAIL_ISO_2022_JP_RAILS_VERSION=$version bundle install
MAIL_GEM_VERSION=$mail_gem_version MAIL_ISO_2022_JP_RAILS_VERSION=$version bundle exec rake test_all
done
done
}
export RUBY_VERSION=2.6.4
# rbenv global 2.6.4
run_for_2_1_0
export RUBY_VERSION=3.0.0
# rbenv global 3.0.0
run_for_2_1_0
export RUBY_VERSION=3.1.3
# rbenv global 3.1.3
run_for_2_1_0
export RUBY_VERSION=3.2.4
# rbenv global 3.2.4
run_for_2_1_0
echo 'Success!'