openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
.github/workflows/ci.yml
112lines · modeblame
af9f9a27Robert Craigie2 years ago | 1 | name: CI |
| 2 | on: | |
| 3 | push: | |
3c78e3a5stainless-app[bot]1 years ago | 4 | branches-ignore: |
| 5 | - 'generated' | |
| 6 | - 'codegen/**' | |
| 7 | - 'integrated/**' | |
| 8 | - 'stl-preview-head/**' | |
| 9 | - 'stl-preview-base/**' | |
9c90b165stainless-app[bot]1 years ago | 10 | pull_request: |
| 11 | branches-ignore: | |
| 12 | - 'stl-preview-head/**' | |
| 13 | - 'stl-preview-base/**' | |
af9f9a27Robert Craigie2 years ago | 14 | |
| 15 | jobs: | |
| 16 | lint: | |
984e85d1stainless-app[bot]1 years ago | 17 | timeout-minutes: 15 |
af9f9a27Robert Craigie2 years ago | 18 | name: lint |
3c78e3a5stainless-app[bot]1 years ago | 19 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 20 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork |
3c78e3a5stainless-app[bot]1 years ago | 21 | |
af9f9a27Robert Craigie2 years ago | 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 | |
3c78e3a5stainless-app[bot]1 years ago | 31 | 21 |
af9f9a27Robert Craigie2 years ago | 32 | cache: gradle |
| 33 | | |
| 34 | - name: Set up Gradle | |
543a08bdstainless-app[bot]1 years ago | 35 | uses: gradle/actions/setup-gradle@v4 |
af9f9a27Robert Craigie2 years ago | 36 | |
| 37 | - name: Run lints | |
| 38 | run: ./scripts/lint | |
b4c700e7stainless-app[bot]1 years ago | 39 | |
| 40 | build: | |
| 41 | timeout-minutes: 15 | |
| 42 | name: build | |
| 43 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} | |
| 44 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork | |
| 45 | | |
| 46 | steps: | |
| 47 | - uses: actions/checkout@v4 | |
| 48 | | |
| 49 | - name: Set up Java | |
| 50 | uses: actions/setup-java@v4 | |
| 51 | with: | |
| 52 | distribution: temurin | |
| 53 | java-version: | | |
| 54 | 8 | |
| 55 | 21 | |
| 56 | cache: gradle | |
| 57 | | |
| 58 | - name: Set up Gradle | |
| 59 | uses: gradle/actions/setup-gradle@v4 | |
| 60 | | |
| 61 | - name: Build SDK | |
dae306e5stainless-app[bot]10 months ago | 62 | # disable gradle daemon in CI because it is flakey |
| 63 | env: | |
| 64 | GRADLE_OPTS: "-Dkotlin.compiler.execution.strategy=in-process" | |
b4c700e7stainless-app[bot]1 years ago | 65 | run: ./scripts/build |
| 66 | | |
7a8cd60aStainless Bot2 years ago | 67 | test: |
984e85d1stainless-app[bot]1 years ago | 68 | timeout-minutes: 15 |
7a8cd60aStainless Bot2 years ago | 69 | name: test |
3c78e3a5stainless-app[bot]1 years ago | 70 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 71 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork |
7a8cd60aStainless Bot2 years ago | 72 | steps: |
| 73 | - uses: actions/checkout@v4 | |
| 74 | | |
| 75 | - name: Set up Java | |
| 76 | uses: actions/setup-java@v4 | |
| 77 | with: | |
| 78 | distribution: temurin | |
| 79 | java-version: | | |
| 80 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 81 | 21 |
7a8cd60aStainless Bot2 years ago | 82 | cache: gradle |
| 83 | | |
| 84 | - name: Set up Gradle | |
| 85 | uses: gradle/gradle-build-action@v2 | |
| 86 | | |
| 87 | - name: Run tests | |
| 88 | run: ./scripts/test | |
cdf6cd11stainless-app[bot]1 years ago | 89 | examples: |
7dbd0f54stainless-app[bot]1 years ago | 90 | timeout-minutes: 10 |
cdf6cd11stainless-app[bot]1 years ago | 91 | name: examples |
3c78e3a5stainless-app[bot]1 years ago | 92 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 93 | if: github.repository == 'openai/openai-java' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) |
cdf6cd11stainless-app[bot]1 years ago | 94 | |
| 95 | steps: | |
| 96 | - uses: actions/checkout@v4 | |
| 97 | | |
| 98 | - name: Set up Java | |
| 99 | uses: actions/setup-java@v4 | |
| 100 | with: | |
| 101 | distribution: temurin | |
| 102 | java-version: | | |
| 103 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 104 | 21 |
cdf6cd11stainless-app[bot]1 years ago | 105 | cache: gradle |
| 106 | - name: Set up Gradle | |
| 107 | uses: gradle/gradle-build-action@v2 | |
af9f9a27Robert Craigie2 years ago | 108 | |
cdf6cd11stainless-app[bot]1 years ago | 109 | - env: |
| 110 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| 111 | run: | | |
| 112 | ./gradlew :openai-java-example:run |