Skip to content

Commit

Permalink
👷 Appraisal: Setup service deps
Browse files Browse the repository at this point in the history
- Improve documentation
- Disable NoBrainer / RethinkDB in CI due to lack of maintenance
  • Loading branch information
pboling committed Nov 14, 2024
1 parent 3d32d0b commit b015ac4
Show file tree
Hide file tree
Showing 40 changed files with 971 additions and 146 deletions.
108 changes: 93 additions & 15 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ancient (EOL) Rubies
name: Ancient (EOL, Ruby 2.4, 2.5) Matrix

on:
push:
Expand All @@ -20,29 +20,107 @@ concurrency:

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }}${{ matrix.name_extra || '' }}
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
gemfile:
- ancient
ruby:
- "2.4"
- "2.5"
- "2.6"
- "2.7"
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
- "Appraisal.root"
rubygems:
- '3.3.27'
bundler:
- '2.3.27'
include:
# Ruby 2.4
- ruby: "2.4"
appraisal: "ar-4-2"
taskname: "spec:orm:active_record"
- ruby: "2.4"
appraisal: "ar-5-0"
taskname: "spec:orm:active_record"
- ruby: "2.4"
appraisal: "ar-5-1"
taskname: "spec:orm:active_record"
- ruby: "2.4"
appraisal: "ar-5-2"
taskname: "spec:orm:active_record"
- ruby: "2.4"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "2.4"
appraisal: "mongoid-7.3"
taskname: "spec:orm:mongoid"
- ruby: "2.4"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"

# Ruby 2.5
- ruby: "2.5"
appraisal: "ar-5-1"
taskname: "spec:orm:active_record"
- ruby: "2.5"
appraisal: "ar-5-2"
taskname: "spec:orm:active_record"
- ruby: "2.5"
appraisal: "ar-6-0"
taskname: "spec:orm:active_record"
- ruby: "2.5"
appraisal: "ar-6-1"
taskname: "spec:orm:active_record"
- ruby: "2.5"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "2.5"
appraisal: "mongoid-7.3"
taskname: "spec:orm:mongoid"
- ruby: "2.5"
appraisal: "mongoid-7.4"
taskname: "spec:orm:mongoid"
- ruby: "2.5"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.taskname, 'couch_potato')"
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
if: "endsWith(matrix.taskname, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
### MONGODB
- name: Start MongoDB
uses: supercharge/[email protected]
if: "endsWith(matrix.taskname, 'mongoid')"
with:
mongodb-version: "8.0"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake test
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}
21 changes: 20 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ jobs:
- '3.1'

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.taskname, 'couch_potato')"
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
if: "endsWith(matrix.taskname, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
### MONGODB
- name: Start MongoDB
uses: supercharge/[email protected]
if: "endsWith(matrix.taskname, 'mongoid')"
with:
mongodb-version: "8.0"

- uses: amancevice/setup-code-climate@v2
name: CodeClimate Install
if: ${{ github.event_name != 'pull_request' }}
Expand All @@ -72,7 +91,7 @@ jobs:
continue-on-error: ${{ matrix.experimental != 'false' }}

- name: Run RSpec tests
run: bundle exec rake test
run: bundle exec rake spec:orm:all

- name: CodeClimate Post-build Notification
run: cc-test-reporter after-build
Expand Down
93 changes: 78 additions & 15 deletions .github/workflows/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,37 +26,100 @@ concurrency:

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
strategy:
fail-fast: true
matrix:
gemfile:
- "Appraisal.root"
rubygems:
- latest
bundler:
- latest
gemfile:
- vanilla
ruby:
- head
- truffleruby-head
- jruby-head
include:
# ruby-head
- ruby: "head"
appraisal: "ar-8-0"
taskname: "spec:orm:active_record"
- ruby: "head"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "head"
appraisal: "mongoid-9.0"
taskname: "spec:orm:mongoid"
- ruby: "head"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"

# truffleruby-head
- ruby: "truffleruby-head"
appraisal: "ar-8-0"
taskname: "spec:orm:active_record"
- ruby: "truffleruby-head"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "truffleruby-head"
appraisal: "mongoid-9.0"
taskname: "spec:orm:mongoid"
- ruby: "truffleruby-head"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"

# jruby-head
- ruby: "jruby-head"
appraisal: "ar-8-0"
taskname: "spec:orm:active_record"
- ruby: "jruby-head"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "jruby-head"
appraisal: "mongoid-9.0"
taskname: "spec:orm:mongoid"
- ruby: "jruby-head"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"

steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.taskname, 'couch_potato')"
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
if: "endsWith(matrix.taskname, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
### MONGODB
- name: Start MongoDB
uses: supercharge/[email protected]
if: "endsWith(matrix.taskname, 'mongoid')"
with:
mongodb-version: "8.0"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
rubygems: "${{ matrix.rubygems }}"
bundler: "${{ matrix.bundler }}"
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run tests
run: bundle exec rake test
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}
104 changes: 104 additions & 0 deletions .github/workflows/legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: Legacy Support (EOL, Ruby 3.0) Matrix

env:
K_SOUP_COV_DO: false

on:
push:
branches:
- 'main'
tags:
- '!*' # Do not execute on tags
pull_request:
branches:
- '*'
# Allow manually triggering the workflow.
workflow_dispatch:

permissions:
contents: read

# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
gemfile:
- "Appraisal.root"
rubygems:
- '3.5.23'
bundler:
- '2.5.23'
include:
- ruby: "3.0"
appraisal: "ar-6-1"
taskname: "spec:orm:active_record"
- ruby: "3.0"
appraisal: "ar-7-0"
taskname: "spec:orm:active_record"
- ruby: "3.0"
appraisal: "ar-7-1"
taskname: "spec:orm:active_record"
- ruby: "3.0"
appraisal: "couch-1.17"
taskname: "spec:orm:couch_potato"
- ruby: "3.0"
appraisal: "mongoid-8.1"
taskname: "spec:orm:mongoid"
- ruby: "3.0"
appraisal: "mongoid-9.0"
taskname: "spec:orm:mongoid"
- ruby: "3.0"
appraisal: "sequel-5.86"
taskname: "spec:orm:sequel"
steps:
### COUCHDB
- name: Start CouchDB
uses: iamssen/couchdb-github-action@master
if: "endsWith(matrix.taskname, 'couch_potato')"
with:
couchdb-version: "3.4.1"
- name: Smoke CouchDB
if: "endsWith(matrix.taskname, 'couch_potato')"
run: |
curl -f http://127.0.0.1:5984/
curl -X POST -H "Content-Type: application/json; charset=utf-8" -d '{"name": "admin", "password": "password"}' http://127.0.0.1:5984/_session
### MONGODB
- name: Start MongoDB
uses: supercharge/[email protected]
if: "endsWith(matrix.taskname, 'mongoid')"
with:
mongodb-version: "8.0"

- name: Checkout
uses: actions/checkout@v4

- name: Setup Ruby & RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
bundler: ${{ matrix.bundler }}
bundler-cache: false
# This will use the BUNDLE_GEMFILE set to matrix.gemfile (i.e. Appraisal.root)
# We need to do this first to get appraisal installed.
# NOTE: This does not use the root Gemfile at all.
- name: Bundle for Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}})
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} (Rails v${{ matrix.rails}}) dependencies
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.taskname }} (Rails v${{ matrix.rails}})
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec rake ${{ matrix.taskname }}
Loading

0 comments on commit b015ac4

Please sign in to comment.