Fix install script URL #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test CleanUbuntu | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test on Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Make script executable | |
| run: chmod +x cleanubuntu | |
| - name: Test help command | |
| run: ./cleanubuntu --help | |
| - name: Test version command | |
| run: ./cleanubuntu --version | |
| - name: Test analyze mode (doesn't require sudo for testing) | |
| run: sudo ./cleanubuntu --analyze || true | |
| - name: Run shellcheck | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| shellcheck cleanubuntu || echo "⚠ Shellcheck warnings (non-blocking)" | |
| - name: Verify script structure | |
| run: | | |
| # Check for required functions | |
| grep -q "clean_apt()" cleanubuntu | |
| grep -q "clean_snap()" cleanubuntu | |
| grep -q "analyze_space()" cleanubuntu | |
| echo "✓ Script structure verified" | |
| - name: Test that script requires sudo for cleanup | |
| run: | | |
| # This should fail without sudo (as intended) | |
| if ./cleanubuntu --apt 2>&1 | grep -q "must be run with sudo"; then | |
| echo "✓ Correctly requires sudo" | |
| else | |
| echo "✗ Should require sudo for cleanup operations" | |
| exit 1 | |
| fi | |
| - name: All tests passed | |
| run: | | |
| echo "================================" | |
| echo "✓ All tests passed successfully!" | |
| echo "================================" |