forked from langchain4j/langchain4j
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (130 loc) · 4.92 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
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