ci: add unit test workflow and package setup for ldapsm
- Add GitHub Actions workflow to run make test - Introduce pyproject.toml with python-ldap dependency and CLI entrypoint - Add Makefile with install/test/clean targets - Move tests to src-based package layout and fix imports - Remove legacy requirements.yml https://chatgpt.com/share/695d2615-d664-800f-b821-5705c631bfe8
This commit is contained in:
23
Makefile
Normal file
23
Makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
.PHONY: help install test lint clean
|
||||
|
||||
PYTHON ?= python3
|
||||
PROJECT_NAME := ldapsm
|
||||
SRC_DIR := src
|
||||
TEST_DIR := tests
|
||||
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo " install Install project in editable mode"
|
||||
@echo " test Run unit tests"
|
||||
@echo " clean Remove Python cache files"
|
||||
|
||||
install:
|
||||
$(PYTHON) -m pip install --upgrade pip
|
||||
$(PYTHON) -m pip install -e .
|
||||
|
||||
test:
|
||||
$(PYTHON) -m unittest discover -s $(TEST_DIR) -p "test_*.py"
|
||||
|
||||
clean:
|
||||
find . -type d -name "__pycache__" -exec rm -rf {} +
|
||||
find . -type f -name "*.pyc" -delete
|
||||
Reference in New Issue
Block a user