I often find myself testing Github workflows by committing and pushing new versions. I’ve tested these workflows locally before, but every time I have to do it again I forgot how it worked exactly, so consider this my personal notebook on how to setup a project for local Github Workflow testing.
Nektos Act
Act allows us to run github actions locally. Let’s see what we have to do to get this running, check it out here: https://github.com/nektos/act
GitHub Local Actions extension for Visual Studio Code and Cursor:
Make it even easier, use an extension that leverages Nektos Act: https://sanjulaganepola.github.io/github-local-actions-docs
Let’s get started
- Install the extension above, search for it in your IDE or link here
- Install act, using homebrew:
brew install act
(link) - Run
act
in your terminal to confirm it’s working - If you’re using the extension, you can now see an extra tab called ‘Github Local Actions’ in your IDE
Honestly – that’s it! You can now test your actions locally before pushing them to Github!
Leave a Reply