Skip to content

Commit 904faf3

Browse files
committed
Merge branch 'release/v5.8.0'
2 parents 5ab5285 + 97c9bda commit 904faf3

348 files changed

Lines changed: 8045 additions & 2868 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ permissions: # added using https://github.com/step-security/secure-repo
99
contents: read
1010

1111
jobs:
12+
steep:
13+
name: Type Check 🔍
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0
20+
with:
21+
ruby-version: 4.0
22+
bundler-cache: true
23+
- run: |
24+
bundle exec steep check --format=github
25+
1226
rubocop:
1327
name: Standard 👮
1428
runs-on: ubuntu-latest
@@ -17,22 +31,24 @@ jobs:
1731
contents: read
1832
steps:
1933
- name: Harden the runner (Audit all outbound calls)
20-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
34+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
2135
with:
2236
egress-policy: audit
2337

2438
- name: Checkout code
25-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
39+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2640
- name: Standard Ruby
2741
uses: standardrb/standard-ruby-action@eecb3f730879f5b8830705348c2961e5aa26de78 # v1.5.0
2842
with:
43+
ruby-version: '4.0'
2944
autofix: false
3045

3146
features:
32-
name: Features (${{ matrix.data-store }} Data Store and ${{ matrix.data-store-image }} Data Store image) 🥒
47+
name: Features (${{ matrix.data-store }} Data Store and ${{ matrix.data-store-image }} Data Store image using ${{matrix.light-creation}}) 🥒
3348
runs-on: ubuntu-latest
3449
strategy:
3550
matrix:
51+
light-creation: [ 'Stoplight()', 'System#light' ]
3652
data-store: [ 'Redis' ]
3753
data-store-image:
3854
- 'redis:7.4'
@@ -41,6 +57,10 @@ jobs:
4157
# Memory does not depend on the Data Store so we only want to run its suite once
4258
- data-store: 'Memory'
4359
data-store-image: 'redis:7.4'
60+
light-creation: 'Stoplight()'
61+
- data-store: 'Memory'
62+
data-store-image: 'redis:7.4'
63+
light-creation: 'System#light'
4464
services:
4565
data-store:
4666
image: ${{ matrix.data-store-image }}
@@ -53,24 +73,25 @@ jobs:
5373
- 6379:6379
5474
steps:
5575
- name: Harden the runner (Audit all outbound calls)
56-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
76+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
5777
with:
5878
egress-policy: audit
5979

6080
- name: Checkout code
61-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
81+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6282

6383
- name: Set up Ruby
64-
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
84+
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0
6585
with:
66-
ruby-version: 3.3.4
86+
ruby-version: 4.0
6787
bundler-cache: true
6888

6989
- name: Run Features
7090
run: bundle exec cucumber features/stoplight
7191
env:
7292
STOPLIGHT_REDIS_URL: 'redis://127.0.0.1:6379/0'
7393
STOPLIGHT_DATA_STORE: ${{ matrix.data-store }}
94+
STOPLIGHT_LIGHT_CREATION: ${{ matrix.light-creation }}
7495
CUCUMBER_PUBLISH_ENABLED: true
7596

7697
spec:
@@ -88,7 +109,7 @@ jobs:
88109
- 'redis:8.0'
89110
- 'valkey/valkey:7.2-alpine'
90111
- 'valkey/valkey:8.1-alpine'
91-
ruby: [ '3.2', '3.3', '3.4' ]
112+
ruby: [ '3.2', '3.3', '3.4', '4.0' ]
92113
services:
93114
data-store:
94115
image: ${{ matrix.data-store-image }}
@@ -101,15 +122,15 @@ jobs:
101122
- 6379:6379
102123
steps:
103124
- name: Harden the runner (Audit all outbound calls)
104-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
125+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
105126
with:
106127
egress-policy: audit
107128

108129
- name: Checkout code
109-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
130+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
110131

111132
- name: Set up Ruby
112-
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
133+
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0
113134
with:
114135
ruby-version: ${{ matrix.ruby }}
115136
bundler-cache: true
@@ -131,7 +152,7 @@ jobs:
131152
runs-on: ubuntu-latest
132153
steps:
133154
- name: Harden the runner (Audit all outbound calls)
134-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
155+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
135156
with:
136157
egress-policy: audit
137158

.github/workflows/dependency-review.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Harden the runner (Audit all outbound calls)
20-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
20+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
2121
with:
2222
egress-policy: audit
2323

2424
- name: 'Checkout Repository'
25-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
25+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2626
- name: 'Dependency Review'
27-
uses: actions/dependency-review-action@3c4e3dcb1aa7874d2c16be7d79418e9b7efd6261 # v4.8.2
27+
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4.9.0

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
version: ${{ steps.version.outputs.version }}
1919
steps:
2020
- name: Harden the runner (Audit all outbound calls)
21-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
21+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
2222
with:
2323
egress-policy: audit
2424

2525
- name: Checkout code
26-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727

2828
- name: Set up Ruby
29-
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
29+
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0
3030
with:
3131
bundler-cache: true
3232
ruby-version: ruby
@@ -49,24 +49,24 @@ jobs:
4949
contents: read
5050
steps:
5151
- name: Harden the runner (Audit all outbound calls)
52-
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
52+
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
5353
with:
5454
egress-policy: audit
5555

5656
- name: Checkout Repository
57-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
58-
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
57+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58+
- uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
5959
- name: Checkout release
60-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
60+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6161
with:
6262
ref: refs/tags/${{ needs.gem.outputs.version }}
6363
- name: Login to Docker Hub
64-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
64+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
6565
with:
6666
username: ${{ vars.DOCKER_HUB_USERNAME }}
6767
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
6868
- name: Build and push
69-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
69+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
7070
with:
7171
push: true
7272
tags: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tmp/
1010
profile_results
1111
/docker/Gemfile.lock
1212
*.log
13+
.gem_rbs_collection/
1314

1415
# OS or Editor folders
1516
.DS_Store

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Use test doubles for testing with abstract dependencies:
5858

5959
```ruby
6060
RSpec.describe Stoplight::Domain::Light do
61-
let(:data_store) { instance_double(Stoplight::Domain::DataStore) }
62-
let(:notifier) { instance_double(Stoplight::Domain::StateTransitionNotifier) }
61+
let(:data_store) { instance_double(Stoplight::Domain::_DataStore) }
62+
let(:notifier) { instance_double(NullNotifier) }
6363

6464
# Test in isolation
6565
it "transitions to red after threshold" do
@@ -72,12 +72,12 @@ end
7272
Use real dependencies when testing infrastructure
7373

7474
```ruby
75-
RSpec.describe Stoplight::Infrastructure::DataStore::Redis do
75+
RSpec.describe Stoplight::Infrastructure::Redis::DataStore do
7676
let(:data_store) { described_class.new(redis) }
7777
let(:redis) { Redis.new(url: connection_string) } # connects to the real database
7878

7979
it "transitions to red" do
80-
data_store.transition_to_color(Stoplight::Domain::Color::RED)
80+
data_store.transition_to_color(Stoplight::Color::RED)
8181
# ... test logic
8282
end
8383
end
@@ -91,7 +91,7 @@ it's tricky to use gherkin language for testing, you can opt out to using integr
9191
```ruby
9292
RSpec.describe "Concurrency testing" do
9393
# Use real implementations
94-
let(:data_store) { Stoplight::Infrastructure::DataStore::Redis.new }
94+
let(:data_store) { Stoplight::Infrastructure::Redis::DataStore.new }
9595

9696
it "persists state across instances" do
9797
# Test actual integration

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ group :development do
2828
gem "simplecov", "~> 0.22"
2929
gem "simplecov-lcov", "~> 0.9"
3030
gem "standard"
31+
gem "steep", require: false
3132
gem "timecop", "~> 0.9"
33+
gem "yard"
3234
end

0 commit comments

Comments
 (0)