A ~15min intro to act for linux or macos
e.g. via homebrew
brew install actGitHub Local Actions is an extension for act on VS code and it is awesome. This is an optional but highly recommended step.
A running container!
Below is a quick example of installing and starting a docker engine with colima (see colima-demo for more info
brew install colimabrew install dockercolima startTip
For act+colima, you may need to set up $DOCKER_HOST via your shell profile (e.g., in ~/.zshrc add export DOCKER_HOST="unix://$HOME/.colima/default/docker.sock") or set up a symlink
e.g. sudo ln -s ~/.colima/default/docker.sock /var/run/docker.sock
Check out the colima FAQ
It is a dummy package for our demo that retrieves and displays random meme images from imgflip.com.
#pip install fine-memes
# For development
uv sync --all-groups# import
from fine_memes import random_meme
# open rando meme
random_meme(
notebook=False, #default, set to True if wanting to render in jupyter notebook
)see tryitout.ipynb
e.g.
- create a copy of the
yofunction in ./fine_memes/__init__.py - give this new function a name of your choosing and change the img url
- create a copy of the
test_yotest in ./tests/test_fine_memes.py as well
Now let's see some CI/CD in action
- Run a job
act -j test- Trigger an event
act pull_request- Now try running jobs from the GitHub Local Actions
Then if happy with act results then actually trigger the GitHub Actions e.g. make a pull_request
Thank you to the above resources, imgflip.com, and for your attention :)