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

chore: enable test multi-python version #143

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

Conversation

l-lumin
Copy link
Contributor

@l-lumin l-lumin commented Dec 19, 2024

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 l-lumin force-pushed the update-python-versions-and-dependencies branch from 9d22588 to 480ffc8 Compare December 19, 2024 15:04
@afourney
Copy link
Member

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?

@l-lumin
Copy link
Contributor Author

l-lumin commented Dec 19, 2024

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

@afourney afourney self-requested a review December 19, 2024 18:14
Copy link
Member

@afourney afourney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

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

@l-lumin
Copy link
Contributor Author

l-lumin commented Dec 19, 2024

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
Copy link
Contributor Author

l-lumin commented Dec 19, 2024

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

Maybe because this is not being triggered.

@afourney
Copy link
Member

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

@l-lumin l-lumin force-pushed the update-python-versions-and-dependencies branch from 37c0ff9 to 2acc826 Compare December 20, 2024 10:04
Update the GitHub Actions checkout and setup-python 
versions to v4 and v5 respectively. Add Python 3.13 
to the testing matrix in both the workflow and 
pyproject.toml to ensure compatibility with the latest 
Python release.
@l-lumin l-lumin force-pushed the update-python-versions-and-dependencies branch from 2acc826 to fde036f Compare December 21, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants