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

add workflow to test the index generator #2

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

tdyas
Copy link
Contributor

@tdyas tdyas commented Dec 2, 2024

Add a GitHub Actions workflow to test the index generator. The test generates an index and then tries to install Pants into a new virtual environment using that index.

@tdyas tdyas marked this pull request as ready for review December 2, 2024 02:42
@tdyas tdyas requested review from benjyw, huonw and thejcannon December 2, 2024 02:42
python3.9 -m venv "${pants_venv_dir}"
"${pants_venv_dir}/bin/pip" install -vv \
--extra-index-url=http://127.0.0.1:8080/simple/ \
pantsbuild.pants==2.18.0a0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This choice of version is necessary for the test to succeed. Pip apparently ignores the links for newer Pants versions as invalid given our current index format. This will be updated once #1 lands and the index format is updated to comply with PEP 503.

Copy link

@huonw huonw left a comment

Choose a reason for hiding this comment

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

Makes sense.

What do you think about using Pants to run this test (and even the generator itself)?

@tdyas
Copy link
Contributor Author

tdyas commented Dec 2, 2024

What do you think about using Pants to run this test (and even the generator itself)?

I agree in principle especially since this repository has no way to format and typecheck the code. That said, tonight's effort is to do the minimum necessary to get some test coverage here. Adding Pants support seems like a follow up to me before exploring some other improvements I would like to do here (after the multi-level index PR).

@huonw
Copy link

huonw commented Dec 2, 2024

Follow-up sounds fine to me!

@tdyas tdyas merged commit 48ad6fa into main Dec 2, 2024
1 check passed
@tdyas tdyas deleted the tdyas/test-generated-index-workflow branch December 2, 2024 02:56
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