Skip to content

Update version to 1.0.0-alpha2-SNAPSHOT #11

Update version to 1.0.0-alpha2-SNAPSHOT

Update version to 1.0.0-alpha2-SNAPSHOT #11

Workflow file for this run

name: Java CI
on:
push:
branches:
- main
paths-ignore:
- '.gitignore'
- '*.md'
- 'LICENSE'
- '.github/*.md'
- '.github/*.yml'
- '.github/*.conf'
- '.github/ISSUE_TEMPLATE/*.md'
pull_request:
branches:
- main
paths-ignore:
- '.gitignore'
- '*.md'
- 'LICENSE'
- '.github/*.md'
- '.github/*.yml'
- '.github/*.conf'
- '.github/ISSUE_TEMPLATE/*.md'
workflow_dispatch:
jobs:
java_build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
java_version:
- 17
- 21
- 23
include:
- java_version: 17
mvn_opts: ''
experimental: false
- java_version: 21
mvn_opts: ''
experimental: false
- java_version: 23
mvn_opts: ''
experimental: true
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create branch from commit by event name
run: |
if [[ '${{ github.event_name }}' == 'push' ]]; then
git branch __branch_before ${{ github.event.before }}
elif [[ "${{ github.event_name }}" == 'pull_request' ]]; then
git branch __branch_before ${{ github.event.pull_request.base.sha }}
fi
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java_version }}
distribution: 'temurin'
cache: 'maven'
- name: Compile and test with JDK ${{ matrix.java_version }}
run: |
mvn -B -U -T8C test javadoc:aggregate \
${{ matrix.mvn_opts }}
- name: Integration test with JDK ${{ matrix.java_version }}
## The step or job will only run if the `experimental` variable
## in the matrix is false (not set to true)
## and the OPENAI_API_KEY secret is available and not empty.
if: ${{ !matrix.experimental && env.OPENAI_API_KEY != '' }}
run: |
mvn -B -U verify \
-Dgib.disable=false -Dgib.referenceBranch=__branch_before \
${{ matrix.mvn_opts }}
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AZURE_OPENAI_ENDPOINT: ${{ secrets.AZURE_OPENAI_ENDPOINT }}
AZURE_OPENAI_KEY: ${{ secrets.AZURE_OPENAI_KEY }}
AZURE_SEARCH_ENDPOINT: ${{ secrets.AZURE_SEARCH_ENDPOINT }}
AZURE_SEARCH_KEY: ${{ secrets.AZURE_SEARCH_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
ELASTICSEARCH_CLOUD_API_KEY: ${{ secrets.ELASTICSEARCH_CLOUD_API_KEY }}
ELASTICSEARCH_CLOUD_URL: ${{ secrets.ELASTICSEARCH_CLOUD_URL }}
GCP_CREDENTIALS_JSON: ${{ secrets.GCP_CREDENTIALS_JSON }}
GCP_LOCATION: ${{ secrets.GCP_LOCATION }}
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_PROJECT_NUM: ${{ secrets.GCP_PROJECT_NUM }}
GCP_VERTEXAI_ENDPOINT: ${{ secrets.GCP_VERTEXAI_ENDPOINT }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GOOGLE_AI_GEMINI_API_KEY: ${{ secrets.GOOGLE_AI_GEMINI_API_KEY }}
HF_API_KEY: ${{ secrets.HF_API_KEY }}
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}
MILVUS_API_KEY: ${{ secrets.MILVUS_API_KEY }}
MILVUS_URI: ${{ secrets.MILVUS_URI }}
MISTRAL_AI_API_KEY: ${{ secrets.MISTRAL_AI_API_KEY }}
NOMIC_API_KEY: ${{ secrets.NOMIC_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }}
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
RAPID_API_KEY: ${{ secrets.RAPID_API_KEY }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
VOYAGE_API_KEY: ${{ secrets.VOYAGE_API_KEY }}
WEAVIATE_API_KEY: ${{ secrets.WEAVIATE_API_KEY }}
WEAVIATE_HOST: ${{ secrets.WEAVIATE_HOST }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/*-reports/TEST-*.xml'
annotate_only: true
# For checking some compliance things (require a recent JDK due to plugins so in a separate step)
compliance:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
# Check we only rely on permissive licenses in the main parts of the library:
- name: License Compliance
run: mvn -P compliance org.honton.chas:license-maven-plugin:compliance