# Generated by GitHub Copilot # # ci.yml — Build and test the calorie-counter backend # # Runs on every push to main and every PR targeting main. # Produces a green/red signal that docker.yml waits for before building images. # # Runs on pi-runner (native ARM64) — no QEMU, no cross-compilation overhead. name: CI on: push: branches: [main] pull_request: branches: [main] # Cancel any in-progress CI run for the same ref so the single-capacity Pi # runner is not blocked by a superseded run. concurrency: group: ci-${{ gitea.ref }} cancel-in-progress: true jobs: test: name: Build & test backend runs-on: pi-runner steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Java 21 LTS uses: actions/setup-java@v4 with: distribution: temurin java-version: '21' cache: maven - name: Run tests working-directory: backend run: mvn -q -ntp clean verify