This is an automated email from the ASF dual-hosted git repository.
SYaoJun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-graphar.git
The following commit(s) were added to refs/heads/main by this push:
new 9dcaef84 ci(java): compile and test the pure-Java SDK modules (#962)
9dcaef84 is described below
commit 9dcaef847212f7391b81bc34da6265c4cc32bda9
Author: alex <[email protected]>
AuthorDate: Mon Aug 24 17:04:55 2026 +0300
ci(java): compile and test the pure-Java SDK modules (#962)
* ci(java): compile and test the pure-Java SDK modules
No workflow builds maven-projects/storage-api. java.yml is filtered to
maven-projects/java/** and java-info.yml to maven-projects/info/**, so a
change to the storage API, or to any module layered on it, reaches main
having passed only the license and pre-commit checks. Nothing proves it
compiles.
This adds a workflow that runs spotless, verify, and javadoc over the
pure-Java SDK reactor. The module list lives in one environment variable
so each new module extends it in the pull request that introduces the
module.
Constraint: the java and spark aggregators cannot be excluded by name,
because their submodules are enumerated inside profile-scoped module
lists, so the reactor is selected by inclusion rather than exclusion.
Not-tested: no module in the selected reactor publishes a JaCoCo report
yet, so this workflow uploads no coverage.
* ci(java): cache the Maven repository and take the current checkout
Review feedback on #962: the workflow downloaded every dependency on
each run, which ASF Infra pays for, and it pinned an action version
three majors behind.
The Maven repository is now cached under a key built from the runner
OS and the hash of every pom in maven-projects, so a run that changes
no dependency restores instead of downloading. Build output is left
uncached: target directories restored across runs can hide a stale
class from a clean build.
---
.github/workflows/java-sdk.yml | 86 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
diff --git a/.github/workflows/java-sdk.yml b/.github/workflows/java-sdk.yml
new file mode 100644
index 00000000..755845da
--- /dev/null
+++ b/.github/workflows/java-sdk.yml
@@ -0,0 +1,86 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+name: GraphAr Java SDK CI
+
+on:
+ push:
+ branches:
+ - main
+ paths:
+ - 'maven-projects/pom.xml'
+ - 'maven-projects/storage-api/**'
+ - 'maven-projects/storage-local/**'
+ - 'maven-projects/io-api/**'
+ - 'maven-projects/io-parquet/**'
+ - 'maven-projects/core/**'
+ - 'maven-projects/reader/**'
+ - 'maven-projects/writer/**'
+ - '.github/workflows/java-sdk.yml'
+ pull_request:
+ branches:
+ - main
+ paths:
+ - 'maven-projects/pom.xml'
+ - 'maven-projects/storage-api/**'
+ - 'maven-projects/storage-local/**'
+ - 'maven-projects/io-api/**'
+ - 'maven-projects/io-parquet/**'
+ - 'maven-projects/core/**'
+ - 'maven-projects/reader/**'
+ - 'maven-projects/writer/**'
+ - '.github/workflows/java-sdk.yml'
+
+concurrency:
+ group: ${{ github.repository }}-${{ github.event.number || github.head_ref
|| github.sha }}-${{ github.workflow }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ env:
+ SDK_MODULES: storage-api
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ submodules: true
+
+ - name: Cache Maven repository
+ uses: actions/cache@v6
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-sdk-${{
hashFiles('maven-projects/**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-sdk-
+
+ - name: Code Format Check
+ working-directory: maven-projects
+ run: |
+ export JAVA_HOME=${JAVA_HOME_11_X64}
+ mvn --no-transfer-progress -pl ${SDK_MODULES} -am spotless:check
+
+ - name: Build and run tests
+ working-directory: maven-projects
+ run: |
+ export JAVA_HOME=${JAVA_HOME_11_X64}
+ mvn --no-transfer-progress -pl ${SDK_MODULES} -am clean verify
-Dspotless.check.skip=true
+
+ - name: Build Java Docs
+ working-directory: maven-projects
+ run: |
+ export JAVA_HOME=${JAVA_HOME_11_X64}
+ mvn --no-transfer-progress -pl ${SDK_MODULES} -am javadoc:javadoc
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]