Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: Create core integ tests folder and setup #4505

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

akrishna1995
Copy link
Contributor

@akrishna1995 akrishna1995 commented Mar 14, 2024

Issue #, if available:

Description of changes:

Moved few integration tests to core folder
this subset will be run for every pull request
to increase velocity of the pull requests

independent contributors must still run the entire test suite

added python 3.11 to the setup.py

Testing done:

run locally and via PR

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • [ x] I have read the CONTRIBUTING doc
  • [x ] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • [ x] I used the commit message format described in CONTRIBUTING
  • [x ] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • [ x] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • [ x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [x ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • [x ] I have checked that my tests are not configured for a specific region or account (if appropriate)
  • [x ] I have used unique_name_from_base to create resource names in integ tests (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Moved few integration tests to core folder
this subset will be run for every pull request
to increase velocity of the pull requests

independent contributors must still run the entire
test suite

added python 3.11 to the setup.py
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.35%. Comparing base (15a40ff) to head (9bcaf12).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4505      +/-   ##
==========================================
+ Coverage   87.34%   87.35%   +0.01%     
==========================================
  Files         388      389       +1     
  Lines       36545    36631      +86     
==========================================
+ Hits        31921    32000      +79     
- Misses       4624     4631       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: e747b44
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: a5512bf
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@akrishna1995 akrishna1995 marked this pull request as ready for review March 15, 2024 00:53
@akrishna1995 akrishna1995 requested a review from a team as a code owner March 15, 2024 00:53
@akrishna1995 akrishna1995 requested review from mohanasudhan and benieric and removed request for a team March 15, 2024 00:53
@mufaddal-rohawala
Copy link
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: 9bcaf12
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

def pytest_collection_modifyitems(config, items):
for item in items:
if "tests/integ/core" in str(item.fspath):
item.add_marker(pytest.mark.core)
Copy link
Contributor

@benieric benieric Mar 15, 2024

Choose a reason for hiding this comment

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

So with this we can do tox -e py310 -- test/integ -m core?

Idea being that we'll be able to split things up here and later on in our buildspec do

tox -e py310 -- test/integ -m $SUB_TESTS

where we pass $SUB_TESTS (or whatever we call it) as an environment variable from our github actions yml. In this case we could set SUB_TESTS='core' to only run core tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup! that's correct.

This is applied as a filter after pytest performs collection and adds a marker to the tests that are in this directory.
Locally the collection runs quickly <3mins

pytest tests/integ --collect-only --quiet -m core

Copy link
Contributor

Choose a reason for hiding this comment

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

nicee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants