Skip to content

Commit b015ac4

Browse files
committedNov 14, 2024··
👷 Appraisal: Setup service deps
- Improve documentation - Disable NoBrainer / RethinkDB in CI due to lack of maintenance
1 parent 3d32d0b commit b015ac4

40 files changed

+971
-146
lines changed
 

‎.github/workflows/ancient.yml

+93-15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Ancient (EOL) Rubies
1+
name: Ancient (EOL, Ruby 2.4, 2.5) Matrix
22

33
on:
44
push:
@@ -20,29 +20,107 @@ concurrency:
2020

2121
jobs:
2222
test:
23-
name: Specs - Ruby ${{ matrix.ruby }}${{ matrix.name_extra || '' }}
23+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
2424
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
2525
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
26-
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
26+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
27+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
28+
runs-on: ubuntu-22.04
2729
strategy:
2830
fail-fast: false
2931
matrix:
3032
gemfile:
31-
- ancient
32-
ruby:
33-
- "2.4"
34-
- "2.5"
35-
- "2.6"
36-
- "2.7"
37-
runs-on: ubuntu-22.04
38-
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
33+
- "Appraisal.root"
34+
rubygems:
35+
- '3.3.27'
36+
bundler:
37+
- '2.3.27'
38+
include:
39+
# Ruby 2.4
40+
- ruby: "2.4"
41+
appraisal: "ar-4-2"
42+
taskname: "spec:orm:active_record"
43+
- ruby: "2.4"
44+
appraisal: "ar-5-0"
45+
taskname: "spec:orm:active_record"
46+
- ruby: "2.4"
47+
appraisal: "ar-5-1"
48+
taskname: "spec:orm:active_record"
49+
- ruby: "2.4"
50+
appraisal: "ar-5-2"
51+
taskname: "spec:orm:active_record"
52+
- ruby: "2.4"
53+
appraisal: "couch-1.17"
54+
taskname: "spec:orm:couch_potato"
55+
- ruby: "2.4"
56+
appraisal: "mongoid-7.3"
57+
taskname: "spec:orm:mongoid"
58+
- ruby: "2.4"
59+
appraisal: "sequel-5.86"
60+
taskname: "spec:orm:sequel"
61+
62+
# Ruby 2.5
63+
- ruby: "2.5"
64+
appraisal: "ar-5-1"
65+
taskname: "spec:orm:active_record"
66+
- ruby: "2.5"
67+
appraisal: "ar-5-2"
68+
taskname: "spec:orm:active_record"
69+
- ruby: "2.5"
70+
appraisal: "ar-6-0"
71+
taskname: "spec:orm:active_record"
72+
- ruby: "2.5"
73+
appraisal: "ar-6-1"
74+
taskname: "spec:orm:active_record"
75+
- ruby: "2.5"
76+
appraisal: "couch-1.17"
77+
taskname: "spec:orm:couch_potato"
78+
- ruby: "2.5"
79+
appraisal: "mongoid-7.3"
80+
taskname: "spec:orm:mongoid"
81+
- ruby: "2.5"
82+
appraisal: "mongoid-7.4"
83+
taskname: "spec:orm:mongoid"
84+
- ruby: "2.5"
85+
appraisal: "sequel-5.86"
86+
taskname: "spec:orm:sequel"
87+
3988
steps:
89+
### COUCHDB
90+
- name: Start CouchDB
91+
uses: iamssen/couchdb-github-action@master
92+
if: "endsWith(matrix.taskname, 'couch_potato')"
93+
with:
94+
couchdb-version: "3.4.1"
95+
- name: Smoke CouchDB
96+
if: "endsWith(matrix.taskname, 'couch_potato')"
97+
run: |
98+
curl -f http://127.0.0.1:5984/
99+
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
100+
101+
### MONGODB
102+
- name: Start MongoDB
103+
uses: supercharge/mongodb-github-action@1.11.0
104+
if: "endsWith(matrix.taskname, 'mongoid')"
105+
with:
106+
mongodb-version: "8.0"
107+
40108
- name: Checkout
41109
uses: actions/checkout@v4
110+
42111
- name: Setup Ruby & RubyGems
43112
uses: ruby/setup-ruby@v1
44113
with:
45-
ruby-version: "${{ matrix.ruby }}"
46-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
47-
- name: Run tests
48-
run: bundle exec rake test
114+
ruby-version: ${{ matrix.ruby }}
115+
rubygems: ${{ matrix.rubygems }}
116+
bundler: ${{ matrix.bundler }}
117+
bundler-cache: false
118+
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
119+
# We need to do this first to get appraisal installed.
120+
# NOTE: This does not use the root Gemfile at all.
121+
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
122+
run: bundle
123+
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
124+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
125+
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
126+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}

‎.github/workflows/coverage.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,25 @@ jobs:
4949
- '3.1'
5050

5151
steps:
52+
### COUCHDB
53+
- name: Start CouchDB
54+
uses: iamssen/couchdb-github-action@master
55+
if: "endsWith(matrix.taskname, 'couch_potato')"
56+
with:
57+
couchdb-version: "3.4.1"
58+
- name: Smoke CouchDB
59+
if: "endsWith(matrix.taskname, 'couch_potato')"
60+
run: |
61+
curl -f http://127.0.0.1:5984/
62+
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
63+
64+
### MONGODB
65+
- name: Start MongoDB
66+
uses: supercharge/mongodb-github-action@1.11.0
67+
if: "endsWith(matrix.taskname, 'mongoid')"
68+
with:
69+
mongodb-version: "8.0"
70+
5271
- uses: amancevice/setup-code-climate@v2
5372
name: CodeClimate Install
5473
if: ${{ github.event_name != 'pull_request' }}
@@ -72,7 +91,7 @@ jobs:
7291
continue-on-error: ${{ matrix.experimental != 'false' }}
7392

7493
- name: Run RSpec tests
75-
run: bundle exec rake test
94+
run: bundle exec rake spec:orm:all
7695

7796
- name: CodeClimate Post-build Notification
7897
run: cc-test-reporter after-build

‎.github/workflows/heads.yml

+78-15
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,100 @@ concurrency:
2626

2727
jobs:
2828
test:
29-
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
29+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
3030
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
3131
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
32-
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
32+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
3333
runs-on: ubuntu-latest
3434
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
3535
strategy:
3636
fail-fast: true
3737
matrix:
38+
gemfile:
39+
- "Appraisal.root"
3840
rubygems:
3941
- latest
4042
bundler:
4143
- latest
42-
gemfile:
43-
- vanilla
44-
ruby:
45-
- head
46-
- truffleruby-head
47-
- jruby-head
44+
include:
45+
# ruby-head
46+
- ruby: "head"
47+
appraisal: "ar-8-0"
48+
taskname: "spec:orm:active_record"
49+
- ruby: "head"
50+
appraisal: "couch-1.17"
51+
taskname: "spec:orm:couch_potato"
52+
- ruby: "head"
53+
appraisal: "mongoid-9.0"
54+
taskname: "spec:orm:mongoid"
55+
- ruby: "head"
56+
appraisal: "sequel-5.86"
57+
taskname: "spec:orm:sequel"
58+
59+
# truffleruby-head
60+
- ruby: "truffleruby-head"
61+
appraisal: "ar-8-0"
62+
taskname: "spec:orm:active_record"
63+
- ruby: "truffleruby-head"
64+
appraisal: "couch-1.17"
65+
taskname: "spec:orm:couch_potato"
66+
- ruby: "truffleruby-head"
67+
appraisal: "mongoid-9.0"
68+
taskname: "spec:orm:mongoid"
69+
- ruby: "truffleruby-head"
70+
appraisal: "sequel-5.86"
71+
taskname: "spec:orm:sequel"
72+
73+
# jruby-head
74+
- ruby: "jruby-head"
75+
appraisal: "ar-8-0"
76+
taskname: "spec:orm:active_record"
77+
- ruby: "jruby-head"
78+
appraisal: "couch-1.17"
79+
taskname: "spec:orm:couch_potato"
80+
- ruby: "jruby-head"
81+
appraisal: "mongoid-9.0"
82+
taskname: "spec:orm:mongoid"
83+
- ruby: "jruby-head"
84+
appraisal: "sequel-5.86"
85+
taskname: "spec:orm:sequel"
4886

4987
steps:
88+
### COUCHDB
89+
- name: Start CouchDB
90+
uses: iamssen/couchdb-github-action@master
91+
if: "endsWith(matrix.taskname, 'couch_potato')"
92+
with:
93+
couchdb-version: "3.4.1"
94+
- name: Smoke CouchDB
95+
if: "endsWith(matrix.taskname, 'couch_potato')"
96+
run: |
97+
curl -f http://127.0.0.1:5984/
98+
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
99+
100+
### MONGODB
101+
- name: Start MongoDB
102+
uses: supercharge/mongodb-github-action@1.11.0
103+
if: "endsWith(matrix.taskname, 'mongoid')"
104+
with:
105+
mongodb-version: "8.0"
106+
50107
- name: Checkout
51108
uses: actions/checkout@v4
52109

53110
- name: Setup Ruby & RubyGems
54111
uses: ruby/setup-ruby@v1
55112
with:
56-
ruby-version: "${{ matrix.ruby }}"
57-
rubygems: "${{ matrix.rubygems }}"
58-
bundler: "${{ matrix.bundler }}"
59-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
60-
61-
- name: Run tests
62-
run: bundle exec rake test
113+
ruby-version: ${{ matrix.ruby }}
114+
rubygems: ${{ matrix.rubygems }}
115+
bundler: ${{ matrix.bundler }}
116+
bundler-cache: false
117+
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
118+
# We need to do this first to get appraisal installed.
119+
# NOTE: This does not use the root Gemfile at all.
120+
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
121+
run: bundle
122+
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
123+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
124+
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
125+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}

‎.github/workflows/legacy.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Legacy Support (EOL, Ruby 3.0) Matrix
2+
3+
env:
4+
K_SOUP_COV_DO: false
5+
6+
on:
7+
push:
8+
branches:
9+
- 'main'
10+
tags:
11+
- '!*' # Do not execute on tags
12+
pull_request:
13+
branches:
14+
- '*'
15+
# Allow manually triggering the workflow.
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
# Cancels all previous workflow runs for the same branch that have not yet completed.
22+
concurrency:
23+
# The concurrency group contains the workflow name and the branch name.
24+
group: "${{ github.workflow }}-${{ github.ref }}"
25+
cancel-in-progress: true
26+
27+
jobs:
28+
test:
29+
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
30+
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
31+
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
32+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
33+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
34+
runs-on: ubuntu-22.04
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
gemfile:
39+
- "Appraisal.root"
40+
rubygems:
41+
- '3.5.23'
42+
bundler:
43+
- '2.5.23'
44+
include:
45+
- ruby: "3.0"
46+
appraisal: "ar-6-1"
47+
taskname: "spec:orm:active_record"
48+
- ruby: "3.0"
49+
appraisal: "ar-7-0"
50+
taskname: "spec:orm:active_record"
51+
- ruby: "3.0"
52+
appraisal: "ar-7-1"
53+
taskname: "spec:orm:active_record"
54+
- ruby: "3.0"
55+
appraisal: "couch-1.17"
56+
taskname: "spec:orm:couch_potato"
57+
- ruby: "3.0"
58+
appraisal: "mongoid-8.1"
59+
taskname: "spec:orm:mongoid"
60+
- ruby: "3.0"
61+
appraisal: "mongoid-9.0"
62+
taskname: "spec:orm:mongoid"
63+
- ruby: "3.0"
64+
appraisal: "sequel-5.86"
65+
taskname: "spec:orm:sequel"
66+
steps:
67+
### COUCHDB
68+
- name: Start CouchDB
69+
uses: iamssen/couchdb-github-action@master
70+
if: "endsWith(matrix.taskname, 'couch_potato')"
71+
with:
72+
couchdb-version: "3.4.1"
73+
- name: Smoke CouchDB
74+
if: "endsWith(matrix.taskname, 'couch_potato')"
75+
run: |
76+
curl -f http://127.0.0.1:5984/
77+
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
78+
79+
### MONGODB
80+
- name: Start MongoDB
81+
uses: supercharge/mongodb-github-action@1.11.0
82+
if: "endsWith(matrix.taskname, 'mongoid')"
83+
with:
84+
mongodb-version: "8.0"
85+
86+
- name: Checkout
87+
uses: actions/checkout@v4
88+
89+
- name: Setup Ruby & RubyGems
90+
uses: ruby/setup-ruby@v1
91+
with:
92+
ruby-version: ${{ matrix.ruby }}
93+
rubygems: ${{ matrix.rubygems }}
94+
bundler: ${{ matrix.bundler }}
95+
bundler-cache: false
96+
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
97+
# We need to do this first to get appraisal installed.
98+
# NOTE: This does not use the root Gemfile at all.
99+
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
100+
run: bundle
101+
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
102+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
103+
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
104+
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}

0 commit comments

Comments
 (0)
Please sign in to comment.