upgrade hstream java client #491
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
pre-check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
distribution: [ "adopt" ] | |
java-version: [ 11 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.java-version }} | |
cache: "gradle" | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: check Java code format | |
run: | | |
./gradlew spotlessJavaCheck | |
./gradlew spotlessGroovyGradleCheck | |
- name: Cache Gradle dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
java-test: | |
needs: pre-check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
distribution: ["adopt"] | |
java-version: [11] | |
test_class: | |
- io.hstream.testing.ClusterKillNodeTest | |
- io.hstream.testing.ConsumerTest | |
- io.hstream.testing.PartitionTest | |
- io.hstream.testing.ProducerTest | |
- 'io.hstream.testing.QueryTest,io.hstream.testing.SecurityTest,io.hstream.testing.SingleNodeTest,' | |
- io.hstream.testing.ReaderTest | |
- io.hstream.testing.ScaleTest | |
- 'io.hstream.testing.StreamTest,io.hstream.testing.SubscriptionTest' | |
include: | |
- test_class: io.hstream.testing.ClusterKillNodeTest | |
name: "ClusterKillNodeTest" | |
- test_class: io.hstream.testing.ConsumerTest | |
name: "ConsumerTest" | |
- test_class: io.hstream.testing.PartitionTest | |
name: "PartitionTest" | |
- test_class: io.hstream.testing.ProducerTest | |
name: "ProducerTest" | |
- test_class: 'io.hstream.testing.QueryTest,io.hstream.testing.SecurityTest,io.hstream.testing.SingleNodeTest,' | |
name: "Query-Security-SingleNodeTest" | |
- test_class: io.hstream.testing.ReaderTest | |
name: "ReaderTest" | |
- test_class: io.hstream.testing.ScaleTest | |
name: "ScaleTest" | |
- test_class: 'io.hstream.testing.StreamTest,io.hstream.testing.SubscriptionTest' | |
name: "Stream-SubscriptionTest" | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.java-version }} | |
cache: "gradle" | |
- name: Run test class | |
run: | | |
echo "${{ matrix.test_class }}" | tr -d '\n' | xargs -d ',' -n1 ./gradlew test -i --tests | |
- uses: actions/upload-artifact@v3 | |
if: ${{ failure() }} | |
with: | |
name: ${{ matrix.name }}-logs-artifact | |
path: | | |
.logs | |
app/build/reports |