Bump version to 15.4.0a1 #5496
Workflow file for this run
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 | |
| - private-preview | |
| - sdk-release/** | |
| - feature/** | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+* | |
| pull_request: | |
| branches: | |
| - master | |
| - beta | |
| - private-preview | |
| - sdk-release/** | |
| - feature/** | |
| permissions: {} | |
| jobs: | |
| lint: | |
| name: Static Checks | |
| runs-on: "ubuntu-24.04" | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.13" | |
| - name: check examples w/ mypy (against python@3.13) | |
| run: just typecheck-examples | |
| # skip deps on all these since mypy installed everything | |
| - name: check linting | |
| run: just --no-deps lint | |
| - name: check formatting | |
| run: just --no-deps format-check | |
| # pyright depends on node, which it handles and installs for itself as needed | |
| # we _could_ run setup-node to make it available for it if we're having reliability problems | |
| - name: check types | |
| # only check against a modern version- unit tests will catch syntax errors on older versions | |
| # this isn't user facing, this is just checking that our code is internally consistent | |
| # e.g. a bug here wouldn't cause user CI to fail since the issue is internal to our codebase | |
| run: just --no-deps typecheck | |
| build: | |
| name: Build | |
| runs-on: "ubuntu-24.04" | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Build and check package | |
| run: | | |
| just build | |
| - name: "Upload Artifact" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| test: | |
| runs-on: "ubuntu-24.04" | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python_version: | |
| # The last ~5 versions, once we're on schedule | |
| # https://docs.stripe.com/sdks/versioning?lang=python#stripe-sdk-language-version-support-policy | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" | |
| - "pypy-3.9" | |
| - "pypy-3.10" | |
| - "pypy-3.11" | |
| name: Test (${{ matrix.python_version }}) | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python_version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - uses: stripe/openapi/actions/stripe-mock@master | |
| - name: "run tests" | |
| run: just test | |
| publish: | |
| name: Publish | |
| if: >- | |
| ((github.event_name == 'workflow_dispatch') || (github.event_name == 'push')) && | |
| startsWith(github.ref, 'refs/tags/v') | |
| needs: [build, test, lint] | |
| runs-on: "ubuntu-24.04" | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: extractions/setup-just@v2 | |
| - uses: actions/checkout@v3 | |
| - name: Download all workflow run artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Set up Python 3 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| - name: Install tools | |
| run: just install-build-deps | |
| - name: Publish packages to PyPI | |
| # could probably move this into a just recipe too? | |
| run: | | |
| set -ex | |
| source .venv/bin/activate | |
| python -m twine upload --verbose dist/* | |
| env: | |
| TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} | |
| TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} | |
| - uses: stripe/openapi/actions/notify-release@master | |
| if: always() | |
| with: | |
| bot_token: ${{ secrets.SLACK_BOT_TOKEN }} |