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

test: Add matrix for test env #7735

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

silvanocerza
Copy link
Contributor

Proposed Changes:

Add a matrix for the test env so we can easily run tests on a different Python version.
As of now there's no easy way to run tests on a certain version as Hatch automatically picks Python 3.12 cause of the default env Python version costraint >=3.8.

After this change we can run tests like so:

$ hatch run +python=3.8 test:unit

Or:

$ hatch run test.py3.8:unit

Calling hatch run test:unit will run unit tests on all the Python versions specified in the matrix.

How did you test it?

I ran tests locally.

Notes for the reviewer

I had to change some workflows to run only a single version of Python.

In the future we can change our workflows so that the pyproject.toml matrix is actually used to generate a job matrix and tests are run for all supported versions.

Checklist

@silvanocerza silvanocerza added the ignore-for-release-notes PRs with this flag won't be included in the release notes. label May 23, 2024
@silvanocerza silvanocerza requested a review from masci May 23, 2024 16:07
@silvanocerza silvanocerza self-assigned this May 23, 2024
@silvanocerza silvanocerza requested a review from a team as a code owner May 23, 2024 16:07
@silvanocerza silvanocerza requested review from davidsbatista and removed request for a team May 23, 2024 16:07
@silvanocerza silvanocerza removed the request for review from davidsbatista May 23, 2024 16:08
@silvanocerza
Copy link
Contributor Author

End to end tests are failing cause Mermaid failed returning an image.
We can ignore the error, the important thing is that the tests started in this case, if they fail we're still in the green.

@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 9211314864

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.522%

Totals Coverage Status
Change from base Build 9211240947: 0.0%
Covered Lines: 6638
Relevant Lines: 7333

💛 - Coveralls

@masci masci requested review from anakin87 and removed request for masci June 21, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release-notes PRs with this flag won't be included in the release notes. topic:build/distribution topic:CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants