Skip to content

chore(deps): update actions/setup-java action to v4 #594

chore(deps): update actions/setup-java action to v4

chore(deps): update actions/setup-java action to v4 #594

Workflow file for this run

name: Build
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run lint
run: ./gradlew spotlessCheck
test-jvm:
name: Test JVM
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
include:
- name: Assistants
test: "*.TestAssistants"
- name: Audio
test: "*.TestAudio"
- name: Chat Completions
test: "*.TestChat*"
- name: Embeddings
test: "*.TestEmbeddings"
- name: Files
test: "*.TestFiles"
- name: Fine-tuning
test: "*.TestFineTuning"
- name: Images
test: "*.TestImages"
- name: Messages
test: "*.TestMessages"
- name: Models
test: "*.TestModels"
- name: Moderations
test: "*.TestModerations"
- name: Runs
test: "*.TestRuns"
- name: Threads
test: "*.TestThreads"
- name: Vector Stores
test: "*.TestVectorStores"
- name: Misc.
test: "*.misc.*"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Test ${{ matrix.name }}
run: ./gradlew :openai-client:jvmTest --tests ${{ matrix.test }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
publish-docs:
runs-on: ubuntu-latest
needs: [ test-jvm ]
if: github.repository == 'aallam/openai-kotlin' && github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build docs
run: ./gradlew dokkaHtmlMultiModule
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
branch: gh-pages
folder: docs
single-commit: true