Skip to content

Java SDK Tests

Java SDK Tests #1325

Workflow file for this run

name: Java SDK Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
sdk-tests:
env:
ASTRA_DB_APPLICATION_TOKEN: ${{ secrets.ASTRA_DB_APPLICATION_TOKEN }}
ASTRA_DB_CLIENT_ID: ${{ secrets.ASTRA_DB_CLIENT_ID }}
ASTRA_DB_CLIENT_SECRET: ${{ secrets.ASTRA_DB_CLIENT_SECRET }}
runs-on: ubuntu-latest
services:
coordinator:
image: stargateio/coordinator-4_0:v2
ports:
- "9042:9042"
- "8081:8081"
- "8090:8090"
env:
JAVA_OPTS: "-Xmx2G"
CLUSTER_NAME: c4-stargate-cluster
CLUSTER_VERSION: 4.0
RACK_NAME: rack1
DATACENTER_NAME: datacenter1
DEVELOPER_MODE: true
restapi:
image: stargateio/restapi:v2
ports:
- "8082:8082"
env:
QUARKUS_HTTP_CORS: true
QUARKUS_HTTP_CORS_ORIGINS: '*'
QUARKUS_HTTP_CORS_METHODS: POST,GET,PUT,OPTIONS,DELETE
QUARKUS_GRPC_CLIENTS_BRIDGE_HOST: coordinator
QUARKUS_GRPC_CLIENTS_BRIDGE_PORT: 8091
QUARKUS_HTTP_ACCESS_LOG_ENABLED: true
QUARKUS_LOG_LEVEL: INFO
docsapi:
image: stargateio/docsapi:v2
ports:
- "8180:8180"
env:
QUARKUS_HTTP_CORS: true
QUARKUS_HTTP_CORS_ORIGINS: '*'
QUARKUS_HTTP_CORS_METHODS: POST,GET,PUT,OPTIONS,DELETE
QUARKUS_GRPC_CLIENTS_BRIDGE_HOST: coordinator
QUARKUS_GRPC_CLIENTS_BRIDGE_PORT: 8091
QUARKUS_HTTP_ACCESS_LOG_ENABLED: true
QUARKUS_LOG_LEVEL: INFO
graphqlapi:
image: stargateio/graphqlapi:v2
ports:
- "8080:8080"
env:
QUARKUS_HTTP_CORS: true
QUARKUS_HTTP_CORS_ORIGINS: '*'
QUARKUS_HTTP_CORS_METHODS: POST,GET,PUT,OPTIONS,DELETE
QUARKUS_GRPC_CLIENTS_BRIDGE_HOST: coordinator
QUARKUS_GRPC_CLIENTS_BRIDGE_PORT: 8091
QUARKUS_HTTP_ACCESS_LOG_ENABLED: true
QUARKUS_LOG_LEVEL: INFO
steps:
# Kill unused mono process that uses port 8084 starting on Ubuntu 20.04 GitHub runner
# This is brute force but other attempts did not work
# see: https://github.com/actions/runner-images/issues/2821
# this doesn't seem to stop the process:
# sudo systemctl stop mono-xsp4.service || true
# neither does uninstalling mono:
# sudo apt-get purge --auto-remove ubuntu-mono mono-runtime
- name: Disable Mono
run: |
sudo killall mono
sudo lsof -iTCP -n -P | sort -k1
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "adopt"
cache: 'maven'
- name: Test with Maven
run: mvn test