@@ -31,20 +31,54 @@ jobs:
3131 validate-patch :
3232 runs-on : ubuntu-latest
3333 steps :
34- - name : Checkout code
35- uses : actions/checkout@v3
36- with :
37- fetch-depth : 0
38- - name : Display info
39- run : |
40- pwd
41- tree -a -I '.git'
42- echo "Action: ${{ github.event.action }}"
43- echo "Sender: ${{ github.event.sender.login }}"
44- git status
45- git log origin/main..HEAD
46- - name : Validate files
47- run : sleep 5
34+ - name : Env
35+ run : printenv
36+ env :
37+ GITHUB_CONTEXT : ${{ toJson(github) }}
38+ - name : Checkout code
39+ uses : actions/checkout@v4
40+ with :
41+ persist-credentials : false
42+ - name : Setup Python
43+ uses : ./.github/actions/setup-python
44+ - name : Setup Gradle
45+ uses : ./.github/actions/setup-gradle
46+ with :
47+ java-version : 23
48+ gradle-cache-read-only : true
49+ gradle-cache-write-only : false
50+ develocity-access-key : ${{ secrets.DEVELOCITY_ACCESS_KEY }}
51+ - name : Compile and validate
52+ env :
53+ SCAN_ARG : ' --no-scan'
54+ # Gradle flags
55+ # --build-cache: Let Gradle restore the build cache
56+ # --info: For now, we'll generate lots of logs while setting up the GH Actions
57+ # --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
58+ # --no-scan: For public fork PRs, we won't attempt to publish the scan
59+ run : |
60+ ./gradlew --build-cache --info $SCAN_ARG check siteDocTar -x test
61+ - name : Annotate checkstyle errors
62+ if : failure()
63+ run : python .github/scripts/checkstyle.py
64+ env :
65+ GITHUB_WORKSPACE : ${{ github.workspace }}
66+ - name : Annotate Rat errors
67+ if : failure()
68+ run : python .github/scripts/rat.py
69+ env :
70+ GITHUB_WORKSPACE : ${{ github.workspace }}
71+ - name : Check generated documentation
72+ # Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error
73+ # message and list the empty files
74+ run : |
75+ tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
76+ if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then
77+ echo "One or more documentation files are empty!" >&2
78+ find ./site-docs/generated -type f -exec grep -L "." {} \; >&2
79+ exit 1
80+ fi
81+
4882 build :
4983 uses : ./.github/workflows/build.yml
5084 with :
0 commit comments