Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
Require all steps to run in java 1.8
Browse files Browse the repository at this point in the history
There's definitely a better way to manage version, but trying to run individual steps against later versions was causing my problems than it solved.
I'll think of the best way to handle this.
  • Loading branch information
TheoKanning committed Nov 12, 2023
1 parent 987801b commit bc81a29
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 44 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/gradle-wrapper-validation.yml

This file was deleted.

12 changes: 3 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-version: 8

- name: Test
run: ./gradlew test
env:
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8

- name: Publish
run: ./gradlew build -x :example:build publish --no-parallel
run: ./gradlew build publish --no-parallel
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
Expand Down
13 changes: 2 additions & 11 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,5 @@ jobs:
distribution: temurin
java-version: 8

- name: Compile Artifacts
run: ./gradlew api:compileJava client:compileJava service:compileJava

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17

- name: Compile Tests
run: ./gradlew compileTestJava
- name: Compile
run: ./gradlew compileJava compileTestJava
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
java-version: 8

- name: Test
run: ./gradlew test --stacktrace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void main(String... args) {
.name("unit")
.type("string")
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
.enumValues(Set.of("celsius", "fahrenheit"))
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
.required(true)
.build())
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
import com.theokanning.openai.completion.chat.*;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import java.util.Collections;
import java.util.*;

import static org.junit.jupiter.api.Assertions.*;

Expand Down Expand Up @@ -164,7 +160,7 @@ void createChatCompletionWithDynamicFunctions() {
.name("unit")
.type("string")
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
.enumValues(Set.of("celsius", "fahrenheit"))
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
.required(true)
.build())
.build();
Expand Down Expand Up @@ -273,7 +269,7 @@ void streamChatCompletionWithDynamicFunctions() {
.name("unit")
.type("string")
.description("The temperature unit, can be 'celsius' or 'fahrenheit'")
.enumValues(Set.of("celsius", "fahrenheit"))
.enumValues(new HashSet<>(Arrays.asList("celsius", "fahrenheit")))
.required(true)
.build())
.build();
Expand Down

0 comments on commit bc81a29

Please sign in to comment.