Skip to content

Commit 93a9947

Browse files
authored
fix: Bump minimum to ruby 3.1 (#57)
1 parent a74139b commit 93a9947

20 files changed

+1042
-132
lines changed

.github/actions/ci/action.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
name: CI Workflow
2-
description: 'Shared CI workflow.'
2+
description: "Shared CI workflow."
33
inputs:
44
ruby-version:
5-
description: 'The version of ruby to setup and run'
5+
description: "The version of ruby to setup and run"
6+
required: true
7+
token:
8+
description: "GH token used to fetch the SDK test harness"
69
required: true
710

811
runs:
@@ -11,11 +14,10 @@ runs:
1114
- uses: ruby/setup-ruby@v1
1215
with:
1316
ruby-version: ${{ inputs.ruby-version }}
14-
bundler: 2.2.10
1517

1618
- name: Install dependencies
1719
shell: bash
18-
run: bundle _2.2.10_ install
20+
run: bundle install
1921

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

2527
- name: Run tests
2628
shell: bash
27-
run: bundle _2.2.10_ exec rspec spec
29+
run: bundle exec rspec spec
30+
31+
- name: Run RuboCop
32+
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
33+
shell: bash
34+
run: bundle exec rubocop --parallel
35+
36+
- name: Build contract tests
37+
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
38+
shell: bash
39+
run: make build-contract-tests
2840

29-
- name: Run contract tests
41+
- name: Start contract test service
3042
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
3143
shell: bash
32-
run: make contract-tests
44+
run: make start-contract-test-service-bg
45+
46+
- uses: launchdarkly/gh-actions/actions/[email protected]
47+
if: ${{ !startsWith(inputs.ruby-version, 'jruby') }}
48+
with:
49+
test_service_port: 8000
50+
token: ${{ inputs.token }}
51+
repo: sse-contract-tests
52+
branch: main
53+
version: v1

.github/workflows/ci.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Run CI
22
on:
33
push:
4-
branches: [ main ]
4+
branches: [main]
55
paths-ignore:
6-
- '**.md' # Do not need to run CI for markdown changes.
6+
- "**.md" # Do not need to run CI for markdown changes.
77
pull_request:
8-
branches: [ main ]
8+
branches: [main]
99
paths-ignore:
10-
- '**.md'
10+
- "**.md"
1111

1212
jobs:
1313
build:
@@ -17,14 +17,11 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
ruby-version:
20-
- '2.5'
21-
- '2.6'
22-
- '2.7'
23-
- '3.0'
24-
- '3.1'
25-
- '3.2'
26-
- jruby-9.3
20+
- "3.2"
21+
- "3.3"
22+
- "3.4"
2723
- jruby-9.4
24+
- jruby-10.0
2825

2926
steps:
3027
- uses: actions/checkout@v4
@@ -34,3 +31,4 @@ jobs:
3431
- uses: ./.github/actions/ci
3532
with:
3633
ruby-version: ${{ matrix.ruby-version }}
34+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/manual-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
workflow_dispatch:
44
inputs:
55
dry_run:
6-
description: 'Is this a dry run. If so no package will be published.'
6+
description: "Is this a dry run. If so no package will be published."
77
type: boolean
88
required: true
99

@@ -18,16 +18,17 @@ jobs:
1818
- uses: actions/checkout@v4
1919

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

2626
- id: build-and-test
2727
name: Build and Test
2828
uses: ./.github/actions/ci
2929
with:
30-
ruby-version: '3.0'
30+
ruby-version: "3.2"
31+
token: ${{ secrets.GITHUB_TOKEN }}
3132

3233
- id: publish
3334
name: Publish Package

.github/workflows/release-please.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ jobs:
2323

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

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

3637
- uses: ./.github/actions/publish
3738
if: ${{ steps.release.outputs.releases_created == 'true' }}

0 commit comments

Comments
 (0)