name: Backend CI on: push: branches: [ develop, main ] paths-ignore: - dc3-web/** pull_request: branches: [ develop, main ] # no paths-ignore here: required checks (compile/Unit/Integration/coverage) # must run on every PR, including dc3-web-only ones (they compile the # unchanged backend — fast with the maven cache — so the PR isn't left BLOCKED) permissions: contents: read concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: compile: runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Checkout uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 - name: Set up JDK 21 uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 with: distribution: liberica java-version: 21 cache: maven cache-dependency-path: "**/pom.xml" - name: Audit controller permissions run: python3 dc3/bin/audit_controller_permissions.py - name: Validate PostgreSQL initialization schema run: python3 dc3/bin/check_postgres_init.py - name: Validate R2DBC migration gate run: python3 dc3/bin/check_r2dbc_migration.py - name: Validate schema fingerprint distribution run: python3 dc3/bin/schema_fingerprint.py --check - name: Validate repository documentation run: python3 dc3/bin/check_documentation.py - name: Validate Java formatting and copyright headers run: mvn -B -DskipTests initialize spotless:check --no-transfer-progress - name: Validate Java naming and Javadoc structure run: mvn -B -DskipTests checkstyle:check --no-transfer-progress - name: Compile run: | set -euo pipefail mvn -U -e -B -DskipTests compile --no-transfer-progress - name: Validate Javadoc run: | set -euo pipefail mvn -B -DskipTests -Dspotless.check.skip=true -Dcheckstyle.skip=true \ -pl dc3-common/dc3-common-public -am install --no-transfer-progress mvn -B -DskipTests -Ddoclint=all -Dmaven.javadoc.failOnWarnings=true \ -pl dc3-common/dc3-common-constant,dc3-common/dc3-common-public \ javadoc:javadoc --no-transfer-progress