Last active
February 20, 2023 23:20
-
-
Save mfurquimdev/d8bd05f45c72be6f48f6cf0555ad263b to your computer and use it in GitHub Desktop.
Automatically run Elixir unit tests inside docker upon change on ./lib/* files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mix test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt update && apt install -y inotify-tools | |
inotifywait -q -m -e close_write -r lib/ | while read -r path event filename; | |
do | |
clear | |
echo -e "\n\n\033[1;7;37mExecuting ./execute.sh because $path$filename was $event\033[0;1;0m" | |
./execute.sh | |
done; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run -it --rm -v "${PWD}:/app" -w /app elixir ./hotload.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment