Skip to content

Add ruby 4.0.0 to test matrix #753

Add ruby 4.0.0 to test matrix

Add ruby 4.0.0 to test matrix #753

Workflow file for this run

name: 🚦Stoplight
on:
pull_request:
push:
branches: [ main ]
permissions: # added using https://github.com/step-security/secure-repo
contents: read
jobs:
steep:
name: Type Check 🔍
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.3.4
bundler-cache: true
- run: |
bundle exec steep check --format=github
rubocop:
name: Standard 👮
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Standard Ruby
uses: standardrb/standard-ruby-action@eecb3f730879f5b8830705348c2961e5aa26de78 # v1.5.0
with:
ruby-version: '3.4'
autofix: false
features:
name: Features (${{ matrix.data-store }} Data Store and ${{ matrix.data-store-image }} Data Store image using ${{matrix.light-creation}}) 🥒
runs-on: ubuntu-latest
strategy:
matrix:
light-creation: [ 'Stoplight()', 'System#light' ]
data-store: [ 'Redis' ]
data-store-image:
- 'redis:7.4'
- 'valkey/valkey:8-alpine'
include:
# Memory does not depend on the Data Store so we only want to run its suite once
- data-store: 'Memory'
data-store-image: 'redis:7.4'
light-creation: 'Stoplight()'
- data-store: 'Memory'
data-store-image: 'redis:7.4'
light-creation: 'System#light'
services:
data-store:
image: ${{ matrix.data-store-image }}
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: 3.3.4
bundler-cache: true
- name: Run Features
run: bundle exec cucumber features/stoplight
env:
STOPLIGHT_REDIS_URL: 'redis://127.0.0.1:6379/0'
STOPLIGHT_DATA_STORE: ${{ matrix.data-store }}
STOPLIGHT_LIGHT_CREATION: ${{ matrix.light-creation }}
CUCUMBER_PUBLISH_ENABLED: true
spec:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
name: Specs on Ruby ${{ matrix.ruby }} with Data Store as ${{ matrix.data-store-image }} 💚
runs-on: ubuntu-latest
strategy:
matrix:
data-store-image:
- 'redis:6.2'
- 'redis:7.2'
- 'redis:7.4'
- 'redis:8.0'
- 'valkey/valkey:7.2-alpine'
- 'valkey/valkey:8.1-alpine'
ruby: [ '3.2', '3.3', '3.4', '4.0' ]
services:
data-store:
image: ${{ matrix.data-store-image }}
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Ruby
uses: ruby/setup-ruby@675dd7ba1b06c8786a1480d89c384f5620a42647 # v1.281.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run Tests
run: bundle exec rake spec
env:
STOPLIGHT_REDIS_URL: 'redis://127.0.0.1:6379/0'
- name: Coveralls
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ruby-${{ matrix.ruby }}
parallel: true
finish:
permissions:
checks: write # for coverallsapp/github-action to create new checks
needs: spec
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- name: Coveralls Finished
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true