openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
.github/workflows/ci.yml
109lines · 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 | |
| 62 | run: ./scripts/build | |
| 63 | | |
7a8cd60aStainless Bot2 years ago | 64 | test: |
984e85d1stainless-app[bot]1 years ago | 65 | timeout-minutes: 15 |
7a8cd60aStainless Bot2 years ago | 66 | name: test |
3c78e3a5stainless-app[bot]1 years ago | 67 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 68 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork |
7a8cd60aStainless Bot2 years ago | 69 | steps: |
| 70 | - uses: actions/checkout@v4 | |
| 71 | | |
| 72 | - name: Set up Java | |
| 73 | uses: actions/setup-java@v4 | |
| 74 | with: | |
| 75 | distribution: temurin | |
| 76 | java-version: | | |
| 77 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 78 | 21 |
7a8cd60aStainless Bot2 years ago | 79 | cache: gradle |
| 80 | | |
| 81 | - name: Set up Gradle | |
| 82 | uses: gradle/gradle-build-action@v2 | |
| 83 | | |
| 84 | - name: Run tests | |
| 85 | run: ./scripts/test | |
cdf6cd11stainless-app[bot]1 years ago | 86 | examples: |
7dbd0f54stainless-app[bot]1 years ago | 87 | timeout-minutes: 10 |
cdf6cd11stainless-app[bot]1 years ago | 88 | name: examples |
3c78e3a5stainless-app[bot]1 years ago | 89 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 90 | if: github.repository == 'openai/openai-java' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) |
cdf6cd11stainless-app[bot]1 years ago | 91 | |
| 92 | steps: | |
| 93 | - uses: actions/checkout@v4 | |
| 94 | | |
| 95 | - name: Set up Java | |
| 96 | uses: actions/setup-java@v4 | |
| 97 | with: | |
| 98 | distribution: temurin | |
| 99 | java-version: | | |
| 100 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 101 | 21 |
cdf6cd11stainless-app[bot]1 years ago | 102 | cache: gradle |
| 103 | - name: Set up Gradle | |
| 104 | uses: gradle/gradle-build-action@v2 | |
af9f9a27Robert Craigie2 years ago | 105 | |
cdf6cd11stainless-app[bot]1 years ago | 106 | - env: |
| 107 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| 108 | run: | | |
| 109 | ./gradlew :openai-java-example:run |