- Add GitHub Actions CI workflow with lint, type-check, test, build, and e2e jobs - Configure Jest for unit and integration tests with coverage reporting - Create unit tests for BaseAgent, PlantLineageAgent, and AgentOrchestrator - Add blockchain PlantChain unit tests - Create API integration tests for plants endpoints - Configure Cypress for E2E testing with support files and custom commands - Add E2E tests for home, plant registration, transparency, and vertical farm pages - Set up Prettier for code formatting with configuration - Configure Husky pre-commit hooks with lint-staged - Add commitlint for conventional commit message enforcement - Update package.json with new scripts and dev dependencies This implements Agent 5 (Testing & CI/CD) from the deployment plan.
36 lines
717 B
Bash
Executable file
36 lines
717 B
Bash
Executable file
#!/usr/bin/env sh
|
|
if [ -z "$husky_skip_init" ]; then
|
|
debug () {
|
|
if [ "$HUSKY_DEBUG" = "1" ]; then
|
|
echo "husky (debug) - $1"
|
|
fi
|
|
}
|
|
|
|
readonly hook_name="$(basename -- "$0")"
|
|
debug "starting $hook_name..."
|
|
|
|
if [ "$HUSKY" = "0" ]; then
|
|
debug "HUSKY env variable is set to 0, skipping hook"
|
|
exit 0
|
|
fi
|
|
|
|
if [ -f ~/.huskyrc ]; then
|
|
debug "sourcing ~/.huskyrc"
|
|
. ~/.huskyrc
|
|
fi
|
|
|
|
readonly husky_skip_init=1
|
|
export husky_skip_init
|
|
sh -e "$0" "$@"
|
|
exitCode="$?"
|
|
|
|
if [ $exitCode != 0 ]; then
|
|
echo "husky - $hook_name hook exited with code $exitCode (error)"
|
|
fi
|
|
|
|
if [ $exitCode = 127 ]; then
|
|
echo "husky - command not found in PATH=$PATH"
|
|
fi
|
|
|
|
exit $exitCode
|
|
fi
|