-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-distribution.bat
More file actions
136 lines (122 loc) · 3.09 KB
/
test-distribution.bat
File metadata and controls
136 lines (122 loc) · 3.09 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@echo off
REM Comprehensive test script for lean-containers distribution
echo ========================================
echo Testing lean-containers Distribution
echo ========================================
echo.
REM Test 1: Build
echo [TEST 1] Building project...
lake build
if %errorlevel% neq 0 (
echo [FAIL] Build failed
exit /b 1
)
echo [PASS] Build successful
echo.
REM Test 2: Run tests
echo [TEST 2] Running tests...
lake env lean FinalProductionTest.lean
if %errorlevel% neq 0 (
echo [FAIL] Tests failed
exit /b 1
)
echo [PASS] Tests successful
echo.
REM Test 3: Run main application
echo [TEST 3] Running main application...
lake env lean Main.lean
if %errorlevel% neq 0 (
echo [FAIL] Main application failed
exit /b 1
)
echo [PASS] Main application successful
echo.
REM Test 4: Makefile targets
echo [TEST 4] Testing Makefile targets...
make -f Makefile.win build
if %errorlevel% neq 0 (
echo [FAIL] Makefile build failed
exit /b 1
)
make -f Makefile.win test
if %errorlevel% neq 0 (
echo [FAIL] Makefile test failed
exit /b 1
)
make -f Makefile.win run
if %errorlevel% neq 0 (
echo [FAIL] Makefile run failed
exit /b 1
)
echo [PASS] Makefile targets successful
echo.
REM Test 5: Docker (if available)
docker --version >nul 2>&1
if %errorlevel% equ 0 (
echo [TEST 5] Testing Docker build...
docker build -t lean-containers:test .
if %errorlevel% neq 0 (
echo [FAIL] Docker build failed
exit /b 1
)
echo [TEST 6] Testing Docker run...
docker run --rm lean-containers:test
if %errorlevel% neq 0 (
echo [FAIL] Docker run failed
exit /b 1
)
echo [PASS] Docker tests successful
) else (
echo [SKIP] Docker not available, skipping Docker tests
)
echo.
REM Test 6: Release script
echo [TEST 7] Testing release script...
if exist scripts\release.bat (
echo [PASS] Release script exists
) else (
echo [FAIL] Release script missing
exit /b 1
)
echo.
REM Test 7: File structure
echo [TEST 8] Verifying file structure...
if exist Dockerfile (
echo [PASS] Dockerfile exists
) else (
echo [FAIL] Dockerfile missing
exit /b 1
)
if exist .dockerignore (
echo [PASS] .dockerignore exists
) else (
echo [FAIL] .dockerignore missing
exit /b 1
)
if exist .github\workflows\ci.yml (
echo [PASS] CI workflow exists
) else (
echo [FAIL] CI workflow missing
exit /b 1
)
echo.
echo ========================================
echo ALL TESTS PASSED!
echo ========================================
echo.
echo The lean-containers repository is ready for distribution.
echo.
echo Quick start commands for users:
echo make -f Makefile.win dev # Set up development environment
echo make -f Makefile.win build # Build the project
echo make -f Makefile.win test # Run tests
echo make -f Makefile.win run # Run the application
echo.
echo Docker commands:
echo docker build -t lean-containers .
echo docker run --rm lean-containers
echo.
echo Release commands:
echo make -f Makefile.win release-dry # Test release process
echo scripts\release.bat # Create release
echo.