Skip to content

Commit

Permalink
Update generated code for beta (#964)
Browse files Browse the repository at this point in the history
* Update generated code for v309

* ci: Fix gh action warnings (#962)

* Update generated code for v309 (#963)

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: pakrym-stripe <[email protected]>

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
Co-authored-by: Anton <[email protected]>
Co-authored-by: pakrym-stripe <[email protected]>
  • Loading branch information
3 people committed Apr 27, 2023
1 parent a9ca709 commit 5f12c0e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 28 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: lint
Expand All @@ -36,10 +36,10 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand All @@ -54,7 +54,7 @@ jobs:
python -m twine check dist/*
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
Expand All @@ -81,29 +81,18 @@ jobs:
]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "setup.py"

- name: Upgrade pip and virtualenv to latest
run: pip install --upgrade pip virtualenv

- name: Get pip cache dir
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: stripe/openapi/actions/stripe-mock@master

- name: Test with pytest
Expand All @@ -125,14 +114,14 @@ jobs:
needs: [build, test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Set up Python 3
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test-nomock: venv

ci-test: venv
${VENV_NAME}/bin/python -m pip install -U tox-gh-actions
@${VENV_NAME}/bin/tox -p auto $(TOX_ARGS)
@${VENV_NAME}/bin/tox $(TOX_ARGS)

coveralls: venv
${VENV_NAME}/bin/python -m pip install -U coveralls
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v305
v316
9 changes: 9 additions & 0 deletions tests/test_generated_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,15 @@ def test_plan_create(self, request_mock):
)
request_mock.assert_requested("post", "/v1/plans")

def test_plan_create2(self, request_mock):
stripe.Plan.create(
amount=2000,
currency="usd",
interval="month",
product={"name": "My product"},
)
request_mock.assert_requested("post", "/v1/plans")

def test_plan_delete(self, request_mock):
stripe.Plan.delete("price_xxxxxxxxxxxxx")
request_mock.assert_requested(
Expand Down
3 changes: 0 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ passenv = GITHUB_*
deps =
coverage >= 4.5.3, < 5 # TODO: upgrade to coverage 5 when we drop support for Python 3.4
coveralls
pytest
pytest-mock
commands =
coverage run --source=stripe -m pytest tests/
coverage combine
coveralls --service=github
depends = py{310,39,38,37,36,35,34,27,py3,py2}

0 comments on commit 5f12c0e

Please sign in to comment.