Skip to content

Commit

Permalink
➕ gem "appraisal", github: "pboling/appraisal", branch: "galtzo"
Browse files Browse the repository at this point in the history
  • Loading branch information
pboling committed Feb 22, 2025
1 parent 87f8b2d commit 3fbfa17
Show file tree
Hide file tree
Showing 62 changed files with 1,672 additions and 155 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/ancient.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
name: Unsupported Compat (EOL, Ruby 2.7) Matrix

env:
K_SOUP_COV_DO: false
name: MRI 2.3, 2.4, 2.5 (EOL)

on:
push:
Expand All @@ -15,9 +12,6 @@ on:
# 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.
Expand All @@ -26,7 +20,7 @@ concurrency:

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
Expand All @@ -36,13 +30,29 @@ jobs:
fail-fast: false
matrix:
include:
# Ruby 2.3
- ruby: "2.3"
appraisal: "ruby-2-3"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"

# Ruby 2.4
- ruby: "2.4"
appraisal: "ruby-2-4"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: "3.3.27"
bundler: "2.3.27"

# Ruby 2.5
- ruby: "2.5"
appraisal: "ruby-2-5"
exec_cmd: "rake test"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: '3.3.27'
bundler: '2.3.27'
rubygems: "3.3.27"
bundler: "2.3.27"

steps:
- name: Checkout
Expand All @@ -59,9 +69,9 @@ jobs:
# Raw `bundle` 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 main Gemfile at all.
- name: Bundle install for Appraisal ${{ matrix.appraisal }}
- name: Install Root Appraisal
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} dependencies
- name: Appraisal for ${{ matrix.appraisal }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }}
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
8 changes: 4 additions & 4 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Test Coverage

env:
K_SOUP_COV_MIN_BRANCH: 80
K_SOUP_COV_MIN_LINE: 91
K_SOUP_COV_MIN_BRANCH: 100
K_SOUP_COV_MIN_LINE: 100
K_SOUP_COV_MIN_HARD: true
K_SOUP_COV_DO: true
K_SOUP_COV_COMMAND_NAME: "RSpec Coverage"
Expand Down Expand Up @@ -30,7 +30,7 @@ concurrency:

jobs:
test:
name: Specs with Coverage - Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
name: Specs with Coverage ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
Expand All @@ -43,7 +43,7 @@ jobs:
# Coverage
- ruby: "3.4"
appraisal: "coverage"
exec_cmd: "rake test"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: latest
bundler: latest
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/current.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Targets the evergreen latest release of ruby, truffleruby, and jruby
name: Current

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 ${{ matrix.ruby }}@${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
strategy:
matrix:
include:
# Ruby 3.4
- ruby: "ruby"
appraisal: "ruby-current"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: latest
bundler: latest
name_extra: "ruby-3.4" # NOTE: This will become out of date!

# truffleruby-24.1 (targets Ruby 3.3.5 compatibility)
- ruby: "truffleruby"
appraisal: "ruby-current"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: default
bundler: default
name_extra: "truffleruby-24.1" # NOTE: This will become out of date!

# jruby-9.4 (targets Ruby 3.1 compatibility)
- ruby: "jruby"
appraisal: "ruby-current"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: default
bundler: default
name_extra: "jruby-9.4" # NOTE: This will become out of date!

steps:
- 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

# Raw `bundle` 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 main Gemfile at all.
- name: Install Root Appraisal
run: bundle
- name: Appraisal for ${{ matrix.appraisal }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Tests for ${{ matrix.ruby }}@${{ matrix.name_extra }} via ${{ matrix.exec_cmd }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
36 changes: 18 additions & 18 deletions .github/workflows/heads.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Heads Compat Matrix
name: Heads

env:
K_SOUP_COV_DO: false
Expand Down Expand Up @@ -26,7 +26,7 @@ concurrency:

jobs:
test:
name: Specs - Ruby ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
name: Specs ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
Expand All @@ -36,30 +36,30 @@ jobs:
fail-fast: true
matrix:
include:
# NOTE: Heads use default rubygems / bundler; their defaults are custom, unreleased, and from the future!
# ruby-head
- ruby: "ruby-head"
appraisal: "ruby-head"
exec_cmd: "rake test"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: latest
bundler: latest
rubygems: default
bundler: default

# truffleruby-head
- ruby: "truffleruby-head"
appraisal: "truffleruby-head"
exec_cmd: "rake test"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: latest
bundler: latest
rubygems: default
bundler: default

# jruby-head
# Error output has a significantly different format in JRuby :(
# - ruby: "jruby-head"
# appraisal: "jruby-head"
# exec_cmd: "rake test"
# gemfile: "Appraisal.root"
# rubygems: latest
# bundler: latest
- ruby: "jruby-head"
appraisal: "jruby-head"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: default
bundler: default

steps:
- name: Checkout
Expand All @@ -76,9 +76,9 @@ jobs:
# Raw `bundle` 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 main Gemfile at all.
- name: Bundle install for Appraisal ${{ matrix.appraisal }}
- name: Install Root Appraisal
run: bundle
- name: Install Appraisal ${{ matrix.appraisal }} dependencies
- name: Appraisal for ${{ matrix.appraisal }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Run ${{ matrix.appraisal }} tests via ${{ matrix.exec_cmd }}
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
62 changes: 62 additions & 0 deletions .github/workflows/hoary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# NOTE: Hoary is a synonym of ancient
name: MRI 2.2 (EOL)

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

# 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 ${{ matrix.ruby }} ${{ matrix.appraisal }}${{ matrix.name_extra || '' }}
if: "!contains(github.event.commits[0].message, '[ci skip]') && !contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-20.04
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
env: # $BUNDLE_GEMFILE must be set at job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
strategy:
fail-fast: false
matrix:
include:
# Ruby 2.2
- ruby: "2.2"
appraisal: "ruby-2-2"
exec_cmd: "rake spec"
gemfile: "Appraisal.root"
rubygems: default
bundler: default

steps:
- 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

# Raw `bundle` 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 main Gemfile at all.
- name: Install Root Appraisal
run: bundle
- name: Appraisal for ${{ matrix.appraisal }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle
- name: Tests for ${{ matrix.ruby }} via ${{ matrix.exec_cmd }}
run: bundle exec appraisal ${{ matrix.appraisal }} bundle exec ${{ matrix.exec_cmd }}
Loading

0 comments on commit 3fbfa17

Please sign in to comment.