test: Add matrix for test env
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
- I have read the contributors guidelines and the code of conduct
- I have updated the related issue with new insights and changes
- I added unit tests and updated the docstrings
- I've used one of the conventional commit types for my PR title:
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:. - I documented my code
- I ran pre-commit hooks and fixed any issue
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.
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 | |
|---|---|
| Change from base Build 9211240947: | 0.0% |
| Covered Lines: | 6638 |
| Relevant Lines: | 7333 |