-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathEarthfile
148 lines (115 loc) · 4.42 KB
/
Earthfile
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
VERSION 0.8
bash-completion:
FROM curlimages/curl:8.00.1
WORKDIR /tmp
RUN curl 'https://raw.githubusercontent.com/scop/bash-completion/2.x/bash_completion' -o ./bash_completion
SAVE ARTIFACT ./bash_completion
ruby:
ARG RUBY_VERSION=3.3
FROM ruby:$RUBY_VERSION
COPY +bash-completion/bash_completion /usr/src/bash_completion
ENV BASH_COMPLETION_SCRIPT=/usr/src/bash_completion
rails-app:
FROM +ruby
ARG RAILS_VERSION="~>7.0"
RUN gem update --system
RUN gem install rails --version "$RAILS_VERSION"
WORKDIR /usr/src
RUN rails new testapp \
--skip-git --skip-keeps \
--skip-action-cable --skip-action-mailer --skip-action-mailbox --skip-active-job --skip-active-storage \
--skip-action-text --skip-javascript --skip-sprockets --skip-turbolinks \
--skip-bootsnap --skip-listen --skip-jbuilder --skip-puma
ENV RAILS_TEST_APP_DIR=/usr/src/testapp
test:
BUILD +test-bundle-all
BUILD +test-gem-all
BUILD +test-jruby-all
BUILD +test-rails-all
BUILD +test-rake-all
BUILD +test-ruby-all
test-latest:
BUILD +test-bundle --RUBY_VERSION=latest --RAILS_VERSION=">=7"
BUILD +test-gem --RUBY_VERSION=latest
BUILD +test-jruby --JRUBY_VERSION=latest
BUILD +test-rails --RUBY_VERSION=latest --RAILS_VERSION=">=7"
BUILD +test-rake --RUBY_VERSION=latest --RAILS_VERSION=">=7"
BUILD +test-ruby --RUBY_VERSION=latest
test-bundle:
FROM +rails-app
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-bundle ./completion-rails ./completion-rake ./tests ./
RUN ./tests/completion-bundle/test.sh
test-bundle-all:
BUILD +test-bundle --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0"
BUILD +test-bundle --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0"
BUILD +test-bundle --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0"
test-gem:
FROM +ruby
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-gem ./tests ./
RUN ./tests/completion-gem/test.sh
test-gem-all:
BUILD +test-gem --RUBY_VERSION=1.9
BUILD +test-gem --RUBY_VERSION=2.0
BUILD +test-gem --RUBY_VERSION=2.1
BUILD +test-gem --RUBY_VERSION=2.2
BUILD +test-gem --RUBY_VERSION=2.3
BUILD +test-gem --RUBY_VERSION=2.4
BUILD +test-gem --RUBY_VERSION=2.5
BUILD +test-gem --RUBY_VERSION=2.6
BUILD +test-gem --RUBY_VERSION=2.7
BUILD +test-gem --RUBY_VERSION=3.0
BUILD +test-gem --RUBY_VERSION=3.1
BUILD +test-gem --RUBY_VERSION=3.2
BUILD +test-gem --RUBY_VERSION=3.3
test-jruby:
ARG JRUBY_VERSION=9
FROM jruby:$JRUBY_VERSION
COPY +bash-completion/bash_completion /usr/src/bash_completion
ENV BASH_COMPLETION_SCRIPT=/usr/src/bash_completion
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-jruby ./completion-ruby ./tests ./
RUN ./tests/completion-jruby/test.sh
test-jruby-all:
# jruby images are available for ARM64 only starting with 9.3, so let's force x86-64
BUILD --platform=linux/amd64 +test-jruby --JRUBY_VERSION=9.2
BUILD +test-jruby --JRUBY_VERSION=9.3
BUILD +test-jruby --JRUBY_VERSION=9.4
test-rails:
FROM +rails-app
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-rails ./tests ./
RUN ./tests/completion-rails/test.sh
test-rails-all:
BUILD +test-rails --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0"
BUILD +test-rails --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0"
BUILD +test-rails --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0"
test-rake:
FROM +rails-app
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-rake ./tests ./
RUN ./tests/completion-rake/test.sh
test-rake-all:
BUILD +test-rake --RUBY_VERSION=3.1 --RAILS_VERSION="~>7.0"
BUILD +test-rake --RUBY_VERSION=3.2 --RAILS_VERSION="~>7.0"
BUILD +test-rake --RUBY_VERSION=3.3 --RAILS_VERSION="~>7.0"
test-ruby:
FROM +ruby
WORKDIR /usr/src/completion-ruby
COPY --dir ./completion-ruby ./tests ./
RUN ./tests/completion-ruby/test.sh
test-ruby-all:
BUILD +test-ruby --RUBY_VERSION=1.9
BUILD +test-ruby --RUBY_VERSION=2.0
BUILD +test-ruby --RUBY_VERSION=2.1
BUILD +test-ruby --RUBY_VERSION=2.2
BUILD +test-ruby --RUBY_VERSION=2.3
BUILD +test-ruby --RUBY_VERSION=2.4
BUILD +test-ruby --RUBY_VERSION=2.5
BUILD +test-ruby --RUBY_VERSION=2.6
BUILD +test-ruby --RUBY_VERSION=2.7
BUILD +test-ruby --RUBY_VERSION=3.0
BUILD +test-ruby --RUBY_VERSION=3.1
BUILD +test-ruby --RUBY_VERSION=3.2
BUILD +test-ruby --RUBY_VERSION=3.3