Skip to content

python: run the Python samples tests with GitHub Actions#16643

Merged
wing328 merged 1 commit intoOpenAPITools:masterfrom
multani:python-client-tests
Sep 22, 2023
Merged

python: run the Python samples tests with GitHub Actions#16643
wing328 merged 1 commit intoOpenAPITools:masterfrom
multani:python-client-tests

Conversation

@multani
Copy link
Contributor

@multani multani commented Sep 21, 2023

This runs more Python tests through GitHub Actions, with multiple code base and multiple Python versions.

I used this a lot to test my change in #16624, which is difficult to fully assess if nothing exercises the generated Python code.

@krjakbrjak as Python tech-comittee
@wing328 as the previous editor on the echo_client sample + GitHub Action workflow

See: #16643

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh ./bin/configs/*.yaml
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (upcoming 7.1.0 minor release - breaking changes with fallbacks), 8.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

- "3.8"
- "3.9"
- "3.10"
#- "3.11"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I know why 3.11 is skipped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some issues in the petstore tests, I will propose a fix so that we can enable 3.11 👍

import urllib3

HOST = 'http://petstore.swagger.io/v2'
HOST = 'http://localhost/v2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we will need to do the same for the python aiohttp samples as well. maybe better to simply update the host table. i will do it with another PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wing328
Copy link
Member

wing328 commented Sep 22, 2023

LGTM. We can go with what you've for the time being.

@wing328 wing328 merged commit e5a29b6 into OpenAPITools:master Sep 22, 2023
@wing328 wing328 added this to the 7.1.0 milestone Sep 22, 2023
@multani multani deleted the python-client-tests branch September 23, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants