diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6656438..7711a6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,43 +40,77 @@ jobs: - name: Run tests run: | + # Set OS-appropriate emojis + if [[ "$RUNNER_OS" == "Windows" ]]; then + OK="[OK]" + SKIP="[SKIP]" + else + OK="✅" + SKIP="⚠️" + fi + # Run basic import tests - python -c "from mini_rag import CodeEmbedder, ProjectIndexer, CodeSearcher; print('[OK] Core imports successful')" + python -c "from mini_rag import CodeEmbedder, ProjectIndexer, CodeSearcher; print('$OK Core imports successful')" # Test basic functionality without venv requirements python -c " + import os + ok_emoji = '$OK' if os.name != 'nt' else '[OK]' + skip_emoji = '$SKIP' if os.name != 'nt' else '[SKIP]' + try: from mini_rag.config import ConfigManager - print('[OK] Config system imports work') + print(f'{ok_emoji} Config system imports work') except Exception as e: - print(f'[SKIP] Config test skipped: {e}') + print(f'{skip_emoji} Config test skipped: {e}') try: from mini_rag.chunker import CodeChunker - print('[OK] Chunker imports work') + print(f'{ok_emoji} Chunker imports work') except Exception as e: - print(f'[SKIP] Chunker test skipped: {e}') + print(f'{skip_emoji} Chunker test skipped: {e}') " - echo "[OK] Core functionality tests completed" + echo "$OK Core functionality tests completed" shell: bash - name: Test auto-update system run: | + # Set OS-appropriate emojis + if [[ "$RUNNER_OS" == "Windows" ]]; then + OK="[OK]" + SKIP="[SKIP]" + else + OK="✅" + SKIP="⚠️" + fi + python -c " + import os + ok_emoji = '$OK' if os.name != 'nt' else '[OK]' + skip_emoji = '$SKIP' if os.name != 'nt' else '[SKIP]' + try: from mini_rag.updater import UpdateChecker updater = UpdateChecker() - print('[OK] Auto-update system available') + print(f'{ok_emoji} Auto-update system available') except ImportError: - print('[SKIP] Auto-update system not available (legacy version)') + print(f'{skip_emoji} Auto-update system not available (legacy version)') " + shell: bash - name: Test CLI commands run: | - echo "[OK] Checking for CLI files..." + # Set OS-appropriate emojis + if [[ "$RUNNER_OS" == "Windows" ]]; then + OK="[OK]" + else + OK="✅" + fi + + echo "$OK Checking for CLI files..." ls -la rag* || dir rag* || echo "CLI files may not be present" - echo "[OK] CLI check completed - this is expected in CI environment" + echo "$OK CLI check completed - this is expected in CI environment" shell: bash security-scan: @@ -97,7 +131,7 @@ jobs: - name: Run security scan run: | # Scan for security issues (non-failing) - bandit -r . -ll || echo "[OK] Security scan completed" + bandit -r . -ll || echo "✅ Security scan completed" auto-update-check: runs-on: ubuntu-latest @@ -119,10 +153,10 @@ jobs: - name: Check for auto-update system run: | if [ -f "mini_rag/updater.py" ]; then - echo "[OK] Auto-update system present" + echo "✅ Auto-update system present" echo "UPDATE_AVAILABLE=true" >> $GITHUB_ENV else - echo "[SKIP] No auto-update system found" + echo "⚠️ No auto-update system found" echo "UPDATE_AVAILABLE=false" >> $GITHUB_ENV fi @@ -133,8 +167,8 @@ jobs: try: from mini_rag.updater import UpdateChecker updater = UpdateChecker() - print(f'[OK] Update system configured for: {updater.github_api_url}') - print(f'[OK] Check frequency: {updater.check_frequency_hours} hours') + print(f'✅ Update system configured for: {updater.github_api_url}') + print(f'✅ Check frequency: {updater.check_frequency_hours} hours') except Exception as e: - print(f'[SKIP] Update system validation skipped: {e}') + print(f'⚠️ Update system validation skipped: {e}') " \ No newline at end of file