π§ Update configuration files π§ #4
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| docker buildx build \ | |
| --platform linux/amd64,linux/arm64 \ | |
| --tag tabssh-builder:latest \ | |
| --load \ | |
| -f docker/Dockerfile . | |
| - name: Validate project structure | |
| run: | | |
| echo "π Validating TabSSH Desktop structure..." | |
| test -f "Cargo.toml" && echo "β Cargo.toml exists" | |
| test -f "Makefile" && echo "β Makefile exists" | |
| test -f "docker/Dockerfile" && echo "β Dockerfile exists" | |
| test -d "src" && echo "β src/ directory exists" | |
| echo "β Project structure validation passed" | |
| - name: Compile check | |
| run: | | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo check --all-targets --verbose | |
| - name: Clippy (linting) | |
| run: | | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo clippy -- -D warnings | |
| - name: Format check | |
| run: | | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo fmt --check | |
| - name: Run tests | |
| run: | | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo test --verbose | |
| - name: Security audit | |
| continue-on-error: true | |
| run: | | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo audit | |
| - name: Build debug (Linux amd64) | |
| run: | | |
| mkdir -p binaries | |
| docker run --rm -v $(pwd):/workspace -w /workspace tabssh-builder:latest \ | |
| cargo build --target x86_64-unknown-linux-musl | |
| cp target/x86_64-unknown-linux-musl/debug/tabssh binaries/tabssh-linux-amd64 || true | |
| - name: Verify binaries | |
| run: | | |
| ls -lh binaries/ | |
| file binaries/tabssh* || true | |
| - name: Feature validation | |
| run: | | |
| echo "π Implementation stats:" | |
| echo " Rust files: $(find src -name '*.rs' | wc -l)" | |
| echo " Lines of code: $(find src -name '*.rs' -exec wc -l {} \; | awk '{total += $1} END {print total}')" | |
| echo " Test files: $(find tests -name '*.rs' 2>/dev/null | wc -l || echo 0)" |