openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
.github/workflows/ci.yml
84lines · 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: | |
7dbd0f54stainless-app[bot]1 years ago | 17 | timeout-minutes: 10 |
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 | |
7a8cd60aStainless Bot2 years ago | 39 | test: |
7dbd0f54stainless-app[bot]1 years ago | 40 | timeout-minutes: 10 |
7a8cd60aStainless Bot2 years ago | 41 | name: test |
3c78e3a5stainless-app[bot]1 years ago | 42 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 43 | if: github.event_name == 'push' || github.event.pull_request.head.repo.fork |
7a8cd60aStainless Bot2 years ago | 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 | |
3c78e3a5stainless-app[bot]1 years ago | 53 | 21 |
7a8cd60aStainless Bot2 years ago | 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 | |
cdf6cd11stainless-app[bot]1 years ago | 61 | examples: |
7dbd0f54stainless-app[bot]1 years ago | 62 | timeout-minutes: 10 |
cdf6cd11stainless-app[bot]1 years ago | 63 | name: examples |
3c78e3a5stainless-app[bot]1 years ago | 64 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
d8b19b7estainless-app[bot]1 years ago | 65 | if: github.repository == 'openai/openai-java' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) |
cdf6cd11stainless-app[bot]1 years ago | 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 | |
3c78e3a5stainless-app[bot]1 years ago | 76 | 21 |
cdf6cd11stainless-app[bot]1 years ago | 77 | cache: gradle |
| 78 | - name: Set up Gradle | |
| 79 | uses: gradle/gradle-build-action@v2 | |
af9f9a27Robert Craigie2 years ago | 80 | |
cdf6cd11stainless-app[bot]1 years ago | 81 | - env: |
| 82 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| 83 | run: | | |
| 84 | ./gradlew :openai-java-example:run |