Skip to content

Commit ed03b49

Browse files
committed
run ci as part of queue
1 parent 9037ed5 commit ed03b49

File tree

1 file changed

+58
-14
lines changed

1 file changed

+58
-14
lines changed

.github/workflows/ci.yml

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,65 @@ concurrency:
3030
jobs:
3131
validate-patch:
3232
runs-on: ubuntu-latest
33+
name: Compile and Check Java
3334
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
35+
- name: Env
36+
run: printenv
37+
env:
38+
GITHUB_CONTEXT: ${{ toJson(github) }}
39+
- name: Checkout code
40+
uses: actions/checkout@v4
41+
with:
42+
persist-credentials: false
43+
- name: Setup Python
44+
uses: ./.github/actions/setup-python
45+
- name: Setup Gradle
46+
uses: ./.github/actions/setup-gradle
47+
with:
48+
java-version: 23
49+
gradle-cache-read-only: true
50+
gradle-cache-write-only: false
51+
develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
52+
- name: Compile and validate
53+
env:
54+
SCAN_ARG: '--no-scan'
55+
# Gradle flags
56+
# --build-cache: Let Gradle restore the build cache
57+
# --info: For now, we'll generate lots of logs while setting up the GH Actions
58+
# --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk
59+
# --no-scan: For public fork PRs, we won't attempt to publish the scan
60+
run: |
61+
./gradlew --build-cache --info $SCAN_ARG check siteDocTar -x test
62+
- name: Archive check reports
63+
if: always()
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: check-reports
67+
path: |
68+
**/build/**/*.html
69+
compression-level: 9
70+
if-no-files-found: ignore
71+
- name: Annotate checkstyle errors
72+
if: failure()
73+
run: python .github/scripts/checkstyle.py
74+
env:
75+
GITHUB_WORKSPACE: ${{ github.workspace }}
76+
- name: Annotate Rat errors
77+
if: failure()
78+
run: python .github/scripts/rat.py
79+
env:
80+
GITHUB_WORKSPACE: ${{ github.workspace }}
81+
- name: Check generated documentation
82+
# Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error
83+
# message and list the empty files
84+
run: |
85+
tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz
86+
if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then
87+
echo "One or more documentation files are empty!" >&2
88+
find ./site-docs/generated -type f -exec grep -L "." {} \; >&2
89+
exit 1
90+
fi
91+
4892
build:
4993
uses: ./.github/workflows/build.yml
5094
with:

0 commit comments

Comments
 (0)