1- .PHONY : help clean lint test molecule molecule-test format \
2- molecule-test molecule-2204-no-uv molecule-2404-no-uv molecule-2404-uv
31
2+ .PHONY : help clean lint test format act act-download distclean
3+
4+ ACT_VERSION ?= 0.2.82
5+ ACT_BINARY := $(shell pwd) /.act/act
46molecule ?= molecule
57
68help : # # Display this help message
@@ -23,37 +25,41 @@ format: ## Format code with black and other formatters
2325 black tests/ --line-length 88 --target-version py39
2426 @echo " Code formatting completed!"
2527
26- test : lint molecule # # Run default test suite (lint + default molecule scenario)
27- @echo " Default testing completed!"
28-
2928molecule-2204-no-uv :
30- @echo " ==> molecule: ubuntu-22.04 (no uv)" ; \
31- LOG=molecule-2204-no-uv.log; \
32- ( MOLECULE_UBUNTU_VERSION=2204 PYTHON_UV_INSTALL=false $( molecule) test -s default 2>&1 | tee $$ LOG ) || ( echo " FAILED: see $$ LOG" ; cat $$ LOG; false )
29+ @echo "molecule : ubuntu-22.04 (no uv)"
30+ LOG =molecule-2204-no-uv.log; \
31+ ( MOLECULE_UBUNTU_VERSION=2204 PYTHON_UV_INSTALL=false $(molecule ) test -s default 2>&1 | tee $$LOG ) || ( echo "FAILED: see $$LOG"; cat $$LOG; false )
3332
3433molecule-2404-no-uv :
35- @echo " ==> molecule: ubuntu-24.04 (no uv)" ; \
36- LOG=molecule-2404-no-uv.log; \
37- ( MOLECULE_UBUNTU_VERSION=2404 PYTHON_UV_INSTALL=false $( molecule) test -s default 2>&1 | tee $$ LOG ) || ( echo " FAILED: see $$ LOG" ; cat $$ LOG; false )
34+ @echo "molecule : ubuntu-24.04 (no uv)"
35+ LOG =molecule-2404-no-uv.log; \
36+ ( MOLECULE_UBUNTU_VERSION=2404 PYTHON_UV_INSTALL=false $(molecule ) test -s default 2>&1 | tee $$LOG ) || ( echo "FAILED: see $$LOG"; cat $$LOG; false )
3837
3938molecule-2404-uv :
40- @echo " ==> molecule: ubuntu-24.04 (with uv)" ; \
41- LOG=molecule-2404-uv.log; \
42- ( MOLECULE_UBUNTU_VERSION=2404 PYTHON_UV_INSTALL=true PYTHON_UV_SUFFIX=" -alt" $( molecule) test -s default 2>&1 | tee $$ LOG ) || ( echo " FAILED: see $$ LOG" ; cat $$ LOG; false )
39+ @echo "molecule : ubuntu-24.04 (with uv)"
40+ LOG =molecule-2404-uv.log; \
41+ ( MOLECULE_UBUNTU_VERSION=2404 PYTHON_UV_INSTALL=true PYTHON_UV_SUFFIX="-alt" $(molecule ) test -s default 2>&1 | tee $$LOG ) || ( echo "FAILED: see $$LOG"; cat $$LOG; false )
4342
44- molecule :
45- @echo " Running all molecule scenarios..."
46- make -j molecule-test
43+ act-download : # # download act
44+ @if [ ! -f " $( ACT_BINARY) " ]; then \
45+ @echo " Downloading act..." ; \
46+ mkdir -p $(shell pwd) /.act ; \
47+ curl -L https://github.com/nektos/act/releases/download/v$(ACT_VERSION ) /act_Linux_x86_64.tar.gz | tar -xz -C $(shell pwd) /.act act ; \
48+ fi
4749
48- molecule-test : molecule-2404-uv molecule-2404-no-uv molecule-2204-no-uv
50+ molecule : molecule-2404-uv molecule-2404-no-uv molecule-2204-no-uv
4951
50- molecule-destroy :
51- @echo " Removing molecule instances "
52- molecule destroy
52+ test : act-download # # Run GitHub workflows, but locally
53+ @echo " Running Tests! "
54+ $( ACT_BINARY )
5355
5456clean : molecule-destroy # # Clean up molecule instances and temporary files
5557 @echo " Cleaning up..."
5658 find . -name " *.pyc" -delete
5759 find . -name " __pycache__" -type d -exec rm -rf {} + 2> /dev/null || true
5860 find . -name " .pytest_cache" -type d -exec rm -rf {} + 2> /dev/null || true
5961 @echo " Cleanup completed!"
62+
63+ distclean : clean
64+ @echo " Dist cleaning..."
65+ rm -rf $(shell pwd) /.act
0 commit comments