Skip to content

fix: Bump minimum to ruby 3.1 #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions .github/actions/ci/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: CI Workflow
description: 'Shared CI workflow.'
description: "Shared CI workflow."
inputs:
ruby-version:
description: 'The version of ruby to setup and run'
description: "The version of ruby to setup and run"
required: true
token:
description: "GH token used to fetch the SDK test harness"
required: true

runs:
Expand All @@ -11,11 +14,10 @@ runs:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
bundler: 2.2.10

- name: Install dependencies
shell: bash
run: bundle _2.2.10_ install
run: bundle install

- name: Skip end to end tests for jruby
if: ${{ startsWith(inputs.ruby-version, 'jruby') }}
Expand All @@ -24,9 +26,28 @@ runs:

- name: Run tests
shell: bash
run: bundle _2.2.10_ exec rspec spec
run: bundle exec rspec spec

- name: Run RuboCop
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
shell: bash
run: bundle exec rubocop --parallel

- name: Build contract tests
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
shell: bash
run: make build-contract-tests

- name: Run contract tests
- name: Start contract test service
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
shell: bash
run: make contract-tests
run: make start-contract-test-service-bg

- uses: launchdarkly/gh-actions/actions/[email protected]
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
with:
test_service_port: 8000
token: ${{ inputs.token }}
repo: sse-contract-tests
branch: main
version: v1
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Run CI
on:
push:
branches: [ main ]
branches: [main]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
- "**.md" # Do not need to run CI for markdown changes.
pull_request:
branches: [ main ]
branches: [main]
paths-ignore:
- '**.md'
- "**.md"

jobs:
build:
Expand All @@ -17,14 +17,11 @@ jobs:
fail-fast: false
matrix:
ruby-version:
- '2.5'
- '2.6'
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- jruby-9.3
- "3.2"
- "3.3"
- "3.4"
- jruby-9.4
- jruby-10.0

steps:
- uses: actions/checkout@v4
Expand All @@ -34,3 +31,4 @@ jobs:
- uses: ./.github/actions/ci
with:
ruby-version: ${{ matrix.ruby-version }}
token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 5 additions & 4 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
inputs:
dry_run:
description: 'Is this a dry run. If so no package will be published.'
description: "Is this a dry run. If so no package will be published."
type: boolean
required: true

Expand All @@ -18,16 +18,17 @@ jobs:
- uses: actions/checkout@v4

- uses: launchdarkly/gh-actions/actions/[email protected]
name: 'Get rubygems API key'
name: "Get rubygems API key"
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/rubygems/api_key = GEM_HOST_API_KEY'
ssm_parameter_pairs: "/production/common/releasing/rubygems/api_key = GEM_HOST_API_KEY"

- id: build-and-test
name: Build and Test
uses: ./.github/actions/ci
with:
ruby-version: '3.0'
ruby-version: "3.2"
token: ${{ secrets.GITHUB_TOKEN }}

- id: publish
name: Publish Package
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ jobs:

- uses: launchdarkly/gh-actions/actions/[email protected]
if: ${{ steps.release.outputs.releases_created == 'true' }}
name: 'Get rubygems API key'
name: "Get rubygems API key"
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/rubygems/api_key = GEM_HOST_API_KEY'
ssm_parameter_pairs: "/production/common/releasing/rubygems/api_key = GEM_HOST_API_KEY"

- uses: ./.github/actions/ci
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
ruby-version: '3.0'
ruby-version: "3.2"
token: ${{ secrets.GITHUB_TOKEN }}

- uses: ./.github/actions/publish
if: ${{ steps.release.outputs.releases_created == 'true' }}
Expand Down
Loading