blob: 755845da4f1469fa49acc1c22eb84e968e219e69 [file]
# 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