openai/openai-java

Public

mirrored from https://github.com/openai/openai-javaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.12.2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/ci.yml

84lines · modecode

1name: CI
2on:
3 push:
4 branches-ignore:
5 - 'generated'
6 - 'codegen/**'
7 - 'integrated/**'
8 - 'stl-preview-head/**'
9 - 'stl-preview-base/**'
10 pull_request:
11 branches-ignore:
12 - 'stl-preview-head/**'
13 - 'stl-preview-base/**'
14
15jobs:
16 lint:
17 timeout-minutes: 10
18 name: lint
19 runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20 if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
21
22 steps:
23 - uses: actions/checkout@v4
24
25 - name: Set up Java
26 uses: actions/setup-java@v4
27 with:
28 distribution: temurin
29 java-version: |
30 8
31 21
32 cache: gradle
33
34 - name: Set up Gradle
35 uses: gradle/actions/setup-gradle@v4
36
37 - name: Run lints
38 run: ./scripts/lint
39 test:
40 timeout-minutes: 10
41 name: test
42 runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
43 if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
44 steps:
45 - uses: actions/checkout@v4
46
47 - name: Set up Java
48 uses: actions/setup-java@v4
49 with:
50 distribution: temurin
51 java-version: |
52 8
53 21
54 cache: gradle
55
56 - name: Set up Gradle
57 uses: gradle/gradle-build-action@v2
58
59 - name: Run tests
60 run: ./scripts/test
61 examples:
62 timeout-minutes: 10
63 name: examples
64 runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
65 if: github.repository == 'openai/openai-java' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
66
67 steps:
68 - uses: actions/checkout@v4
69
70 - name: Set up Java
71 uses: actions/setup-java@v4
72 with:
73 distribution: temurin
74 java-version: |
75 8
76 21
77 cache: gradle
78 - name: Set up Gradle
79 uses: gradle/gradle-build-action@v2
80
81 - env:
82 OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
83 run: |
84 ./gradlew :openai-java-example:run
85