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

Impossible to use for Python-based actions #41

Closed
hynek opened this issue Jul 23, 2023 · 5 comments
Closed

Impossible to use for Python-based actions #41

hynek opened this issue Jul 23, 2023 · 5 comments

Comments

@hynek
Copy link

hynek commented Jul 23, 2023

I've been using pdm for a while to manage the deps for my build-and-inspect-python-package but kept exporting to an requirements.txt. But after running into some issues with pdm export I've decided to try to switch to pdm wholesale, but that doesn't seem to be possible, because pdm instantly looks for a pdm.lock and fails if it doesn't find it: https://github.com/hynek/build-and-inspect-python-package/actions/runs/5636001548/job/15267605972

You have more experience writing GitHub Actions so maybe I'm missing something? It seems to me tho, that I'd need an project-path input to be able to point the action to ${{ github.action_path }}?

@frostming
Copy link
Contributor

It looks for lockfile as the cache key when cache is true, try turning off the caches.

@hynek
Copy link
Author

hynek commented Jul 25, 2023

You're referring to the secondary problem, correct? I got that solved in Discord, but unless I want to export my lock files manually or rebuild a secondary PR workflow around the exported file, I need a way to tell pdm where to look for the project.

@frostming
Copy link
Contributor

Okay, so what problems are left, exporting issue or changing directory?

@hynek
Copy link
Author

hynek commented Jul 25, 2023

Sorry for mixing this two. I have both problems and they block me from using PDM for an GitHub Action.

The primary here is, that it's impossible to use setup-pdm when the Python project I'm about to use is not in the current directory (but in this case ${{ github.action_path }}).

I'm basically trying to migrate everything into PDM instead of doing exports: hynek/build-and-inspect-python-package#57

I can't be 100% sure that will work out, but currently I'm blocked on this.

@hynek
Copy link
Author

hynek commented Jul 25, 2023

We have fixed this problem on Discord: my failure is only caused by the caching implemention. The solution is to either disable it or point it to the file.

@hynek hynek closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2023
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

No branches or pull requests

2 participants