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

Run tests without tox #794

Merged
merged 7 commits into from
Jan 23, 2024
Merged

Run tests without tox #794

merged 7 commits into from
Jan 23, 2024

Conversation

jairhenrique
Copy link
Collaborator

@jairhenrique jairhenrique commented Dec 11, 2023

This change remove flaky errors on ci.
Tests are faster with dependency caching.

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (f1e0241) 90.13% compared to head (cba2b2d) 90.83%.
Report is 5 commits behind head on master.

Files Patch % Lines
vcr/stubs/httpx_stubs.py 95.83% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #794      +/-   ##
==========================================
+ Coverage   90.13%   90.83%   +0.69%     
==========================================
  Files          27       27              
  Lines        1815     1822       +7     
  Branches      336      338       +2     
==========================================
+ Hits         1636     1655      +19     
+ Misses        134      122      -12     
  Partials       45       45              

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

@jairhenrique
Copy link
Collaborator Author

@hartwork What do you think about this approach? I didn't have any strange errors when running the tests, the suite was executed without the need to run the pipeline to force the tests to turn green.

Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique this reduces coverage with regard to covering with urllib3 1.x and 2.x for the same version of Python, e.g. for Python 3.10 we cover:

  • py310-requests-urllib3-1
  • py310-urllib3-1
  • py310-requests-urllib3-2
  • py310-urllib3-2

Too keep the same level of coverage and be protected against regressions this would probably need the include variant of the matrix feature of GitHub Actions. And if we take this route we probably want to git rid of tox altogether to not have to maintain it and not have it uncovered. (Dropping tox will affect which tests contributors are running locally one way or another also.)

Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique the general direction is good, some details need fixing:

  • git grep tox shows more places that need adjustment:

    # git --no-pager grep tox
    .gitignore:.tox
    runtests.sh:# https://blog.ionelmc.ro/2015/04/14/tox-tricks-and-patterns/#when-it-inevitably-leads-to-shell-scripts
    runtests.sh:# You can and should use WSL for running tox on Windows when it calls bash scripts.
  • The pull request does 5+ different things all in one commit. It would be great to split this up into semantic units using git rebase -i.

  • Plus everything I commented below:

.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique exclude is a nice idea — it's more future-proof than include — but there is at least one key showstopper left below:

.github/workflows/main.yml Outdated Show resolved Hide resolved
@hartwork
Copy link
Collaborator

@jairhenrique the general direction is good, some details need fixing:

  • git grep tox shows more places that need adjustment:

    # git --no-pager grep tox
    .gitignore:.tox
    runtests.sh:# https://blog.ionelmc.ro/2015/04/14/tox-tricks-and-patterns/#when-it-inevitably-leads-to-shell-scripts
    runtests.sh:# You can and should use WSL for running tox on Windows when it calls bash scripts.
    
  • The pull request does 5+ different things all in one commit. It would be great to split this up into semantic units using git rebase -i.

  • Plus everything I commented below:

@jairhenrique did you see this^^?

Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique thanks for the adjustments! Is keeping .tox in .gitignore intentional?

@jairhenrique
Copy link
Collaborator Author

@jairhenrique thanks for the adjustments! Is keeping .tox in .gitignore intentional?

@hartwork yes, to prevent someone from uploading this folder to the repository.

@hartwork
Copy link
Collaborator

hartwork commented Dec 11, 2023

@jairhenrique thanks for the adjustments! Is keeping .tox in .gitignore intentional?

@hartwork yes, to prevent someone from uploading this folder to the repository.

@jairhenrique I'm not sure I understand — wouldn't we see an addition like that in the pull request when it's happening? Please help me understand.

@jairhenrique
Copy link
Collaborator Author

@jairhenrique I'm not sure I understand — wouldn't we see an addition like that in the pull request when it's happening? Please help me understand.

Yes, we would see. I just left it so I would have to avoid this work. I can remove it if you understand that this is a problem.

Copy link
Collaborator

@hartwork hartwork left a comment

Choose a reason for hiding this comment

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

@jairhenrique I'm not sure I understand — wouldn't we see an addition like that in the pull request when it's happening? Please help me understand.

Yes, we would see. I just left it so I would have to avoid this work. I can remove it if you understand that this is a problem.

@jairhenrique I'll leave it to you, we'll probably be good either way.

Thanks for the other adjustments, the nice split up into multiple commits — this pull request has come a long way! 👍

@jairhenrique
Copy link
Collaborator Author

@kevin1024 do you agree with these changes?

@jairhenrique jairhenrique merged commit 62fe272 into master Jan 23, 2024
15 checks passed
@jairhenrique jairhenrique deleted the no-tox branch January 23, 2024 02:17
@graingert
Copy link
Collaborator

This broke the tornado tests: https://github.com/kevin1024/vcrpy/actions/runs/7620100960/job/20754258427?pr=794#step:5:38 note all the warnings

@graingert
Copy link
Collaborator

actually it looks like it was broken before

@jairhenrique
Copy link
Collaborator Author

actually it looks like it was broken before

@graingert yes 😞

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.

4 participants