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

nektos/act compatibility #629

Closed
ruby0b opened this issue Jan 5, 2023 · 2 comments
Closed

nektos/act compatibility #629

ruby0b opened this issue Jan 5, 2023 · 2 comments

Comments

@ruby0b
Copy link

ruby0b commented Jan 5, 2023

It's nice to be able to test github CI locally without pushing to some remote.
https://github.com/nektos/act makes this possible but due to an issue with the actions/cache action haskell-ci won't work out of the box with it (nektos/act#285).

The workaround is simply guarding the cache step using if: ${{ !env.ACT }} as mentioned in nektos/act#285 (comment).
Including this would make act work without having to manually edit the CI file generated by haskell-ci and tracking down the workaround in the first place.

@phadej
Copy link
Collaborator

phadej commented Jan 6, 2023

I'm not a fan. Why cannot act be taught to skip (or mock) actions/cache steps. That would solve issue for all.

I don't want to keep track of third party things, there are already enough.

@ruby0b
Copy link
Author

ruby0b commented Jan 8, 2023

Yeah that's fair, I agree.

For future reference:

  1. I did find an act issue for fixing actions/cache: Enhancement: Automatically disable unsupported cache actions nektos/act#989
  2. That issue is not actually why the cache step fails in this case though. The caching should just not do anything and output a warning. The reason it fails is that act does not auto-install node when using container:. (See Issue: exec: "node": executable file not found in $PATH: unknown nektos/act#973 (comment))

So for now you're probably best off adding if: ${{ !env.ACT }} to the cache action whenever you want to run act (and invoking act -r to reuse the container).

@ruby0b ruby0b closed this as completed Jan 8, 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