refactor: Rimuovi passaggi obsoleti e semplifica il workflow CI #6
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 | |
| # Run on push/PR to main branch | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| ZIG_VERSION: "0.14.0" | |
| jobs: | |
| # Single job for linting, build and test | |
| ci: | |
| name: Lint, Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: ${{ env.ZIG_VERSION }} | |
| - name: Check code formatting (lint) | |
| shell: bash | |
| run: | | |
| echo "Checking Zig code formatting..." | |
| zig fmt --check src/ | |
| echo "✅ Code formatting OK" | |
| - name: Build project | |
| shell: bash | |
| run: | | |
| echo "Building project..." | |
| zig build | |
| echo "✅ Build successful" | |
| - name: Run tests | |
| shell: bash | |
| run: | | |
| echo "Running tests..." | |
| zig build test | |
| echo "✅ Tests passed" | |
| - name: Build release version | |
| shell: bash | |
| run: | | |
| echo "Building release version..." | |
| zig build -Doptimize=ReleaseFast | |
| echo "✅ Release build successful" |