Add ErrorObject rbi file (#1906) #211
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - master | |
| - beta | |
| - sdk-release/** | |
| - feature/** | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+* | |
| pull_request: | |
| branches: | |
| - master | |
| - beta | |
| - private-preview | |
| - sdk-release/** | |
| - feature/** | |
| permissions: {} | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.1 | |
| - name: Lint | |
| run: just lint | |
| - name: Build | |
| run: gem build stripe.gemspec | |
| - name: 'Upload Artifact' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gems | |
| path: '*.gem' | |
| test: | |
| name: Test (${{ matrix.ruby-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| # https://docs.stripe.com/sdks/versioning?lang=ruby#stripe-sdk-language-version-support-policy | |
| # https://endoflife.date/ruby | |
| ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4', jruby-9.4.7.0, truffleruby-25.0.0] | |
| include: | |
| - os: windows-latest | |
| # use any modern-ish version | |
| ruby-version: '3.4' | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| - uses: stripe/openapi/actions/stripe-mock@master | |
| - name: test | |
| run: just test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.github_token }} | |
| # Use IP instead of 'localhost' to avoid slow DNS resolution on Windows | |
| STRIPE_MOCK_HOST: ${{ runner.os == 'Windows' && '127.0.0.1' || 'localhost' }} | |
| - name: typecheck | |
| # sorbet doesn't support windows | |
| if: runner.os != 'Windows' | |
| run: just typecheck | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.github_token }} | |
| publish: | |
| name: Publish | |
| if: >- | |
| ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push')) && | |
| startsWith(github.ref, 'refs/tags/v') | |
| needs: [build, test] | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Download all workflow run artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gems | |
| path: gems | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.1 | |
| - name: Publish gems to Rubygems | |
| run: gem push gems/*.gem | |
| env: | |
| GEM_HOST_API_KEY: ${{secrets.GEM_HOST_API_KEY}} | |
| - uses: stripe/openapi/actions/notify-release@master | |
| if: always() | |
| with: | |
| bot_token: ${{ secrets.SLACK_BOT_TOKEN }} |