markitdown icon indicating copy to clipboard operation
markitdown copied to clipboard

chore: enable test multi-python version

Open l-lumin opened this issue 1 year ago • 5 comments

Current Behavior:

The test suite currently runs only on a single Python version.

Proposed Changes:

  • Update the GitHub Actions workflow to test multiple Python versions using matrix strategy.
  • Add Python 3.13 to the workflow matrix.
  • Add Python test matrix to pypyproject
  • Remove the actions/cache@v3 step as setup-python already uses toolkit/cache internally. [1]
Evidence

Before

Run hatch test
Creating environment: hatch-test.py3.10
Installing project in development mode
Checking dependencies
Syncing dependencies
============================= test session starts ==============================
platform linux -- Python 3.10.[12](https://github.com/microsoft/markitdown/actions/runs/12406010086/job/34642150347#step:6:13), pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/markitdown/markitdown
configfile: pyproject.toml
plugins: rerunfailures-[14](https://github.com/microsoft/markitdown/actions/runs/12406010086/job/34642150347#step:6:15).0, xdist-3.6.1, mock-3.14.0, anyio-4.7.0
collected 5 items

tests/test_markitdown.py s.s.s                                           [100%]

========================= 2 passed, 3 skipped in 4.58s =========================

After {83784D46-3A03-4BF3-AA3D-EFB1C4EC021B}

Run hatch test
Creating environment: hatch-test.py3.10
Installing project in development mode
Checking dependencies
Syncing dependencies
============================= test session starts ==============================
platform linux -- Python 3.10.[12](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647604825#step:5:13), pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/markitdown/markitdown
configfile: pyproject.toml
plugins: rerunfailures-[14](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647604825#step:5:15).0, xdist-3.6.1, mock-3.14.0, anyio-4.7.0
collected 5 items

tests/test_markitdown.py s.s.s                                           [100%]

========================= 2 passed, 3 skipped in 4.50s =========================
Run hatch test
Creating environment: hatch-test.py3.10
Installing project in development mode
Checking dependencies
Syncing dependencies
============================= test session starts ==============================
platform linux -- Python 3.10.[12](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605206#step:5:13), pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/markitdown/markitdown
configfile: pyproject.toml
plugins: rerunfailures-[14](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605206#step:5:15).0, xdist-3.6.1, mock-3.14.0, anyio-4.7.0
collected 5 items

tests/test_markitdown.py s.s.s                                           [100%]

========================= 2 passed, 3 skipped in 4.59s =========================
Run hatch test
Creating environment: hatch-test.py3.10
Installing project in development mode
Checking dependencies
Syncing dependencies
============================= test session starts ==============================
platform linux -- Python 3.10.[12](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605533#step:5:13), pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/markitdown/markitdown
configfile: pyproject.toml
plugins: rerunfailures-[14](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605533#step:5:15).0, xdist-3.6.1, mock-3.14.0, anyio-4.7.0
collected 5 items

tests/test_markitdown.py s.s.s                                           [100%]

========================= 2 passed, 3 skipped in 4.62s =========================
Run hatch test
Creating environment: hatch-test.py3.10
Installing project in development mode
Checking dependencies
Syncing dependencies
============================= test session starts ==============================
platform linux -- Python 3.10.[12](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605883#step:5:13), pytest-8.3.4, pluggy-1.5.0
rootdir: /home/runner/work/markitdown/markitdown
configfile: pyproject.toml
plugins: rerunfailures-[14](https://github.com/l-lumin/markitdown/actions/runs/12410944415/job/34647605883#step:5:15).0, xdist-3.6.1, mock-3.14.0, anyio-4.7.0
collected 5 items

tests/test_markitdown.py s.s.s                                           [100%]

========================= 2 passed, 3 skipped in 4.50s =========================

l-lumin avatar Dec 19 '24 10:12 l-lumin

Looks good. I noticed this removes caching. I'm not sure caching was ever working as I wanted in the CI, but I wonder if you could comment on this?

afourney avatar Dec 19 '24 17:12 afourney

Looks good. I noticed this removes caching. I'm not sure caching was ever working as I wanted in the CI, but I wonder if you could comment on this?

Remove the actions/cache@v3 step as setup-python already uses toolkit/cache internally. [1]

They're basically the same thing, but with a simpler setup

l-lumin avatar Dec 19 '24 18:12 l-lumin

Everything looks good in concept. The CI appears to be getting suck though: image

Any idea why the final "tests" entry is perpetually waiting?

https://github.com/orgs/community/discussions/26698#discussioncomment-3252954

can you try this

l-lumin avatar Dec 19 '24 18:12 l-lumin

https://github.com/microsoft/markitdown/actions/runs/12411289890

Maybe because this is not being triggered.

l-lumin avatar Dec 19 '24 18:12 l-lumin

Ok, let me try that, and some other things. In meetings this AM, but I'll get to this ASAP

afourney avatar Dec 19 '24 19:12 afourney