diff --git a/.github/workflows/samples-ruby.yaml b/.github/workflows/samples-ruby.yaml index 0998e572735f..383a3ac52cb6 100644 --- a/.github/workflows/samples-ruby.yaml +++ b/.github/workflows/samples-ruby.yaml @@ -26,8 +26,19 @@ jobs: - samples/client/petstore/ruby-faraday/ - samples/client/petstore/ruby-httpx/ - samples/client/petstore/ruby-autoload/ + services: + petstore-api: + image: swaggerapi/petstore + ports: + - 80:8080 + env: + SWAGGER_HOST: http://petstore.swagger.io + SWAGGER_BASE_PATH: /v2 steps: - uses: actions/checkout@v5 + - name: Add hosts to /etc/hosts + run: | + sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts - uses: ruby/setup-ruby@v1 with: ruby-version: '3.2' # Not needed with a .ruby-version, .tool-versions or mise.toml