Nightly Build #10
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: Nightly Build | |
on: | |
schedule: | |
- cron: '0 0 * * *' # daily at midnight UTC | |
workflow_dispatch: | |
jobs: | |
java_build: | |
if: github.repository == 'langchain4j/langchain4j' | |
strategy: | |
fail-fast: false # do not cancel jobs on error | |
matrix: | |
java_version: | |
- 17 | |
- 21 | |
include: | |
- java_version: '17' | |
mvn_opts: '-pl !langchain4j-ollama,!langchain4j-local-ai,!langchain4j-milvus' | |
- java_version: '21' | |
mvn_opts: '-pl !langchain4j-ollama,!langchain4j-local-ai,!langchain4j-milvus' | |
max-parallel: 1 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java_version }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Authenticate to Google Cloud | |
# Needed for langchain4j-vertex-ai and langchain4j-vertex-ai-gemini modules | |
uses: 'google-github-actions/auth@v2' | |
with: | |
project_id: ${{ secrets.GCP_PROJECT_ID }} | |
credentials_json: ${{ secrets.GCP_CREDENTIALS_JSON }} | |
- name: Build with JDK ${{ matrix.java_version }} | |
run: | | |
## compile and verify javadocs on ALL modules | |
mvn -B -U -T8C test javadoc:aggregate \ | |
--fail-at-end \ | |
${{ matrix.mvn_opts }} | |
## run tests for some modules | |
mvn -B -U verify \ | |
--fail-at-end \ | |
-Dmaven.test.failure.ignore=true \ | |
${{ 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.GITHUB_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 }} | |
MONGODB_ATLAS_USERNAME: ${{ secrets.MONGODB_ATLAS_USERNAME }} | |
MONGODB_ATLAS_PASSWORD: ${{ secrets.MONGODB_ATLAS_PASSWORD }} | |
MONGODB_ATLAS_HOST: ${{ secrets.MONGODB_ATLAS_HOST }} | |
NOMIC_API_KEY: ${{ secrets.NOMIC_API_KEY }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
OPENAI_BASE_URL: ${{ secrets.OPENAI_BASE_URL }} | |
OVHAI_AI_API_KEY: ${{ secrets.OVHAI_AI_API_KEY }} | |
PINECONE_API_KEY: ${{ secrets.PINECONE_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 }} | |
CI_DELAY_SECONDS_AZURE_OPENAI: 1 | |
CI_DELAY_SECONDS_BEDROCK: 1 | |
CI_DELAY_SECONDS_GOOGLE_AI_GEMINI: 5 | |
CI_DELAY_SECONDS_VERTEX_AI_GEMINI: 5 | |
CI_DELAY_SECONDS_VOYAGE_AI: 22 | |
- name: Upload Test Reports | |
if: always() # always run even if the previous step failed or was cancelled | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Test-Reports-${{ matrix.java-version }} | |
path: '**/target/*-reports/*' | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: always() # always run even if the previous step failed or was cancelled | |
with: | |
report_paths: '**/target/*-reports/TEST-*.xml' | |
annotate_only: true |