@@ -141,13 +141,10 @@ jobs:
141141 source /opt/rh/devtoolset-10/enable
142142 cmake --build build --config ${{ env.BUILD_TYPE }}
143143
144- - name : Cleanup Build Trees and Intermediate Files
144+ - name : Cleanup Build Trees
145145 run : |
146146 rm -rf ./buildtrees
147- # 只清理非必要的构建中间文件,保留可执行文件和关键目录
148- find ./build -path "*/CMakeFiles/*.o" -delete || true
149- find ./build -path "*/CMakeFiles/*.a" -delete || true
150- # 保留codis目录和重要结构
147+ rm -rf ./deps
151148 df -h
152149
153150 - name : Test
@@ -158,26 +155,6 @@ jobs:
158155 working-directory : ${{ github.workspace }}
159156 run : ./pikatests.sh all clean
160157
161- - name : Cleanup After Unit Test
162- run : |
163- # 清理单元测试产生的临时文件
164- find ${{ github.workspace }} -name "log*" -type d -exec rm -rf {} + || true
165- find ${{ github.workspace }} -name "db*" -type d -exec rm -rf {} + || true
166- find ${{ github.workspace }} -name "dump*" -type d -exec rm -rf {} + || true
167- find ${{ github.workspace }} -name "dbsync*" -type d -exec rm -rf {} + || true
168- # 更彻底地清理临时文件
169- find ${{ github.workspace }} -name "*.log" -type f -delete || true
170- find ${{ github.workspace }} -name "*.tmp" -type f -delete || true
171- find ${{ github.workspace }} -name "core.*" -type f -delete || true
172- df -h
173-
174- - name : Cleanup Before Integration Tests
175- working-directory : ${{ github.workspace }}/build
176- run : |
177- # 在启动集成测试前再次确认清理
178- rm -rf ./log* ./db* ./dump* ./dbsync*
179- df -h
180-
181158 - name : Start codis, pika master and pika slave
182159 working-directory : ${{ github.workspace }}/build
183160 run : |
@@ -186,26 +163,14 @@ jobs:
186163 chmod +x ../tests/integration/start_codis.sh
187164 ../tests/integration/start_codis.sh
188165
189- - name : Run Go E2E Tests with Incremental Cleanup
166+ - name : Run Go E2E Tests
190167 working-directory : ${{ github.workspace }}/build
191168 run : |
192- # 在测试运行期间添加定期清理
169+ cd ../tools/pika_keys_analysis/
170+ go test -v ./...
193171 cd ../../tests/integration/
194172 chmod +x integrate_test.sh
195-
196- # 修改集成测试脚本,添加中间清理步骤
197- sed -i 's/go test -run=TestPikaWithCache -timeout 60m/go test -run=TestPikaWithCache -timeout 30m/g' integrate_test.sh
198- sed -i 's/go test -run=TestPikaWithoutCache -timeout 60m/go test -run=TestPikaWithoutCache -timeout 30m/g' integrate_test.sh
199-
200- # 运行测试并定期清理
201- bash -c "while true; do find ${{ github.workspace }} -name \"db*\" -type d -mmin +10 -exec rm -rf {} + 2>/dev/null; sleep 60; done" &
202- CLEANER_PID=$!
203-
204- # 运行测试
205- sh integrate_test.sh || true
206-
207- # 停止清理进程
208- kill $CLEANER_PID 2>/dev/null || true
173+ sh integrate_test.sh
209174
210175 - name : Cleanup Test Data
211176 if : always()
0 commit comments