-
Notifications
You must be signed in to change notification settings - Fork 13
85 lines (72 loc) · 2.66 KB
/
pr.yml
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
name: Pull Request
on:
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
versions: [
{ java: 8, gradle: 6.8 },
{ java: 11, gradle: 6.8 },
{ java: 16, gradle: 7.3.1 },
{ java: 17, gradle: 7.3.1 }
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.versions.java}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.versions.gradle }}
- name: Setup gradle.properties
if: matrix.versions.java == 16 || matrix.versions.java == 17
run: |
echo "org.gradle.jvmargs=-Xmx4096m --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED" >> gradle.properties
- name: Execute Gradle build
run: gradle clean build
- name: Build jar
run: gradle jar
- name: Compile integration tests
run: gradle compileIntegrationTestJava
integration-test:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
versions: [
{ java: 8, gradle: 6.8 },
{ java: 17, gradle: 7.3.1 }
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.versions.java}}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: ${{ matrix.versions.gradle }}
- name: Setup gradle.properties
if: matrix.versions.java == 16 || matrix.versions.java == 17
run: |
echo "org.gradle.jvmargs=-Xmx4096m --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED" >> gradle.properties
- name: Execute Gradle build
run: gradle clean build
- name: Run integration tests
run: gradle integrationTest
env:
PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
PINECONE_ENVIRONMENT: ${{ secrets.PINECONE_ENVIRONMENT }}