-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprebuild.sh
More file actions
executable file
Β·50 lines (44 loc) Β· 1.58 KB
/
prebuild.sh
File metadata and controls
executable file
Β·50 lines (44 loc) Β· 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
echo "π Kreatisite Pre-Build Pipeline (Phase 5: CI/CD Integration)"
echo "============================================================="
# Run pre-commit checks on all files (includes Black, isort, flake8, mypy, etc.)
echo ""
echo "π Stage 1: Code Quality Checks (pre-commit hooks)"
echo "---------------------------------------------------"
poetry run pre-commit run --all-files || {
echo "β Pre-commit checks failed. Please fix issues before building.";
exit 1;
}
echo "β
Code quality checks passed!"
echo ""
find . -type f -name "*.sh" -exec shellcheck {} + || {
echo "β shellcheck failed. Please fix issues before building.";
exit 1;
}
echo "β
shellcheck passed!"
# Run comprehensive test suite (unit, integration, e2e with coverage)
echo ""
echo "π Stage 2: Comprehensive Test Suite"
echo "------------------------------------"
poetry run comprehensive-tests || {
echo "β Comprehensive tests failed. Please fix issues before building.";
exit 1;
}
echo ""
echo "π Stage 3: Package Build"
echo "-------------------------"
echo "Building package..."
poetry build || {
echo "β Package build failed.";
exit 1;
}
echo ""
echo "============================================================="
echo "β
PRE-BUILD PIPELINE COMPLETED SUCCESSFULLY!"
echo " - Code Quality: β
(Black, isort, flake8, mypy)"
echo " - Unit Tests: β
(with 80% coverage requirement)"
echo " - Integration Tests: β
"
echo " - E2E Smoke Tests: β
"
echo " - Package Build: β
"
echo "============================================================="