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

Use Docker to ensure local tests and CI pipeline tests agree? #12523

Open
papadeltasierra opened this issue Aug 13, 2024 · 4 comments
Open

Use Docker to ensure local tests and CI pipeline tests agree? #12523

papadeltasierra opened this issue Aug 13, 2024 · 4 comments
Labels
project: infrastructure typeshed build, test, documentation, or distribution related

Comments

@papadeltasierra
Copy link

Refs:

Both these CI pipelines show errors despite me running tests/runtests.py locally beforehand and seeing no errors.

I assume this is the result of some sort of versioning issue between the testing tools being used. Would it be possible to provide a Docker container that has the tooling matching the CI pipeline so that running tests locally matches test results in the CI pipeline?

@AlexWaygood
Copy link
Member

runtests.py is meant to be a convenience tool for contributors, but isn't meant to exhaustively run every check in our CI pipeline. While most of our tests can be run locally, it wouldn't really be practical to run all of them locally for every PR; we have an awful lot of CI here. In general, we don't expect PRs to necessarily pass every check immediately after you open them, and we don't look down on PRs that have checks failing at first :-)

@papadeltasierra
Copy link
Author

Fair enough but one issue I hit was that running the tests locally flagged an error "in reverse" to the CI i.e. I had to ADD a type hint to pass locally, then REMOVE it to pass the CI tests. Surely the test I'm running locally should match one of the tests run in CI and I should not be seeing this? I do appreciate that "CI might spot something that local tests missed" but this was not one of those ;-).

@AlexWaygood
Copy link
Member

Hmm, that sounds strange. Can you be more specific? Which tests were complaining, and which type hint was it?

@AlexWaygood AlexWaygood added the project: infrastructure typeshed build, test, documentation, or distribution related label Aug 14, 2024
@papadeltasierra
Copy link
Author

I tried to reproduce this this evening but I'm guessing there has been an update to one of the checkers because my code, which was "clean" locally yesterday, now has 9000 errors! Hopefully they are all the result of one simple required change and I will be able to get back to you later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project: infrastructure typeshed build, test, documentation, or distribution related
Projects
None yet
Development

No branches or pull requests

2 participants