diff --git a/tests/test-action.sh b/tests/test-action.sh index d70e3fd..db94894 100755 --- a/tests/test-action.sh +++ b/tests/test-action.sh @@ -16,111 +16,24 @@ echo -e "${YELLOW}Starting test for Sync Repository Template action${NC}" # ------------------------------------------------------------ if ! command -v uvx >/dev/null 2>&1; then echo -e "${YELLOW}Installing uv / uvx${NC}" - curl -LsSf https://astral.sh/uv/install.sh | sh - export PATH="$HOME/.local/bin:$PATH" fi # ------------------------------------------------------------ -# Helpers -# ------------------------------------------------------------ -assert() { - local condition=$1 - local message=$2 - - if eval "${condition}"; then - echo -e "${GREEN}✅ PASS: ${message}${NC}" - else - echo -e "${RED}❌ FAIL: ${message}${NC}" - exit 1 - fi -} - -# ------------------------------------------------------------ -# Temp workspace +# Clone the jebel-quant/rhiza repository to test with # ------------------------------------------------------------ TEST_DIR="$(mktemp -d)" trap 'rm -rf "${TEST_DIR}"' EXIT echo "Using temp dir: ${TEST_DIR}" -# ------------------------------------------------------------ -# Source repo (template) -# ------------------------------------------------------------ -echo -e "${YELLOW}Setting up template repository${NC}" -SOURCE_REPO="${TEST_DIR}/template" -mkdir -p "${SOURCE_REPO}" -cd "${SOURCE_REPO}" - -git init -q -git config user.name "Test User" -git config user.email "test@example.com" - -cat > README.md < CODE_OF_CONDUCT.md < CONTRIBUTING.md < .github/workflows/test.yml - -cat > LICENSE < README.md < LICENSE < .github/template.yml <