haystack icon indicating copy to clipboard operation
haystack copied to clipboard

test: Add matrix for test env

Open silvanocerza opened this issue 1 year ago • 2 comments

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 avatar May 23 '24 16:05 silvanocerza

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.

silvanocerza avatar May 23 '24 16:05 silvanocerza

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

coveralls avatar May 23 '24 16:05 coveralls