Merge dev to main: Security improvements and comprehensive test infrastructure #39

Merged
jimmy merged 195 commits from dev into main 2026-04-08 01:42:27 +08:00
Showing only changes of commit 7ad4095ad6 - Show all commits
+31 -2
View File
@@ -58,6 +58,15 @@ jobs:
tail -50 integration-test-output.txt >> $GITHUB_STEP_SUMMARY 2>/dev/null || echo "No integration test output" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Check test results
if: always()
run: |
if [ "${UNIT_TEST_EXIT_CODE:-1}" != "0" ] || [ "${INTEGRATION_TEST_EXIT_CODE:-1}" != "0" ]; then
echo "❌ Backend tests failed"
exit 1
fi
echo "✅ All backend tests passed"
- name: Upload backend coverage report
if: always()
uses: actions/upload-artifact@v3
@@ -109,6 +118,15 @@ jobs:
tail -50 test-output.txt >> $GITHUB_STEP_SUMMARY 2>/dev/null || echo "No test output" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
- name: Check test results
if: always()
run: |
if [ "${FRONTEND_TEST_EXIT_CODE:-1}" != "0" ]; then
echo "❌ Frontend tests failed"
exit 1
fi
echo "✅ All frontend tests passed"
- name: Upload frontend coverage report
if: always()
uses: actions/upload-artifact@v3
@@ -123,6 +141,17 @@ jobs:
if: always()
steps:
- name: Check job results
run: |
echo "Backend tests: ${{ needs.backend-tests.result }}"
echo "Frontend tests: ${{ needs.frontend-tests.result }}"
if [ "${{ needs.backend-tests.result }}" != "success" ] || [ "${{ needs.frontend-tests.result }}" != "success" ]; then
echo "❌ Some tests failed"
exit 1
fi
echo "✅ All tests passed"
- name: Download backend coverage
uses: actions/download-artifact@v3
with:
@@ -141,7 +170,7 @@ jobs:
run: |
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "✅ Backend tests completed" >> $GITHUB_STEP_SUMMARY
echo "✅ Frontend tests completed" >> $GITHUB_STEP_SUMMARY
echo "✅ Backend tests passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Frontend tests passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Coverage reports uploaded as artifacts." >> $GITHUB_STEP_SUMMARY