forked from makandra/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
111 lines (98 loc) · 2.42 KB
/
.gitlab-ci.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
.rascal:
variables:
BUNDLE_PATH: /cache/bundle
CI: true
volumes:
cache: /cache
before_shell:
- bundle check
jobs:
ruby-1.8.7:
variables:
BUNDLE_GEMFILE: /repo/Gemfile.1.8
ruby-2.3:
variables:
BUNDLE_GEMFILE: /repo/Gemfile.2.3
ruby-2.5:
variables:
BUNDLE_GEMFILE: /repo/Gemfile.2.5
ruby-2.7:
variables:
BUNDLE_GEMFILE: /repo/Gemfile.2.7
postgresql-14:
variables:
BUNDLE_GEMFILE: /repo/Gemfile.2.5
.lts_job: <s_job
image: registry.makandra.de/rails-lts/rails-lts-docker/test-env:3.2
services:
- name: registry.makandra.de/rails-lts/rails-lts-docker/pg:9.1
alias: pg-db
- name: registry.makandra.de/rails-lts/rails-lts-docker/mysql:5.6
alias: mysql-db
- name: registry.makandra.de/rails-lts/rails-lts-docker/memcached:1.5
alias: memcached
before_script:
- ruby -v
- bundle install
- bundle pristine
script:
- bundle exec rake railslts:test
variables: <s_job_variables
BUNDLE_PATH: ./bundle/vendor
MYSQL_HOST: mysql-db
MYSQL_USER: rails
PG_HOST: pg-db
PG_USER: rails
MEMCACHE_HOST: memcached
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- ./bundle/vendor
.ruby-1.8.7: &ruby_1_8_7
BUNDLE_GEMFILE: Gemfile.1.8
RBENV_VERSION: 1.8.7
.ruby-2.3: &ruby_2_3
BUNDLE_GEMFILE: Gemfile.2.3
RBENV_VERSION: "2.3"
.ruby-2.5: &ruby_2_5
BUNDLE_GEMFILE: Gemfile.2.5
RBENV_VERSION: "2.5"
.ruby-2.7: &ruby_2_7
BUNDLE_GEMFILE: Gemfile.2.7
RBENV_VERSION: "2.7"
# ============= Actual jobs ================
ruby-1.8.7:
<<: *lts_job
variables:
<<: *lts_job_variables
<<: *ruby_1_8_7
PROMPT: 'rails 2.3 : ruby 1.8.7'
ruby-2.3:
<<: *lts_job
variables:
<<: *lts_job_variables
<<: *ruby_2_3
PROMPT: 'rails 2.3 : ruby 2.3'
ruby-2.5:
<<: *lts_job
variables:
<<: *lts_job_variables
<<: *ruby_2_5
PROMPT: 'rails 2.3 : ruby 2.5'
ruby-2.7:
<<: *lts_job
variables:
<<: *lts_job_variables
<<: *ruby_2_7
PROMPT: 'rails 2.3 : ruby 2.7'
postgresql-14:
<<: *lts_job
services:
- name: registry.makandra.de/rails-lts/rails-lts-docker/pg:14.1
alias: pg-db
variables:
<<: *lts_job_variables
<<: *ruby_2_5
PROMPT: 'rails 2.3 : ruby 2.5 : postgres 14'
script:
- cd activerecord && BUNDLE_GEMFILE=../Gemfile.2.5 bundle exec rake postgresql:rebuild_databases test_postgresql