openai/openai-java
Publicmirrored from https://github.com/openai/openai-javaAvailable
.github/workflows/ci.yml
82lines · 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' }} |
| 20 | | |
af9f9a27Robert Craigie2 years ago | 21 | steps: |
| 22 | - uses: actions/checkout@v4 | |
| 23 | | |
| 24 | - name: Set up Java | |
| 25 | uses: actions/setup-java@v4 | |
| 26 | with: | |
| 27 | distribution: temurin | |
| 28 | java-version: | | |
| 29 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 30 | 21 |
af9f9a27Robert Craigie2 years ago | 31 | cache: gradle |
| 32 | | |
| 33 | - name: Set up Gradle | |
543a08bdstainless-app[bot]1 years ago | 34 | uses: gradle/actions/setup-gradle@v4 |
af9f9a27Robert Craigie2 years ago | 35 | |
| 36 | - name: Run lints | |
| 37 | run: ./scripts/lint | |
7a8cd60aStainless Bot2 years ago | 38 | test: |
7dbd0f54stainless-app[bot]1 years ago | 39 | timeout-minutes: 10 |
7a8cd60aStainless Bot2 years ago | 40 | name: test |
3c78e3a5stainless-app[bot]1 years ago | 41 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
7a8cd60aStainless Bot2 years ago | 42 | steps: |
| 43 | - uses: actions/checkout@v4 | |
| 44 | | |
| 45 | - name: Set up Java | |
| 46 | uses: actions/setup-java@v4 | |
| 47 | with: | |
| 48 | distribution: temurin | |
| 49 | java-version: | | |
| 50 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 51 | 21 |
7a8cd60aStainless Bot2 years ago | 52 | cache: gradle |
| 53 | | |
| 54 | - name: Set up Gradle | |
| 55 | uses: gradle/gradle-build-action@v2 | |
| 56 | | |
| 57 | - name: Run tests | |
| 58 | run: ./scripts/test | |
cdf6cd11stainless-app[bot]1 years ago | 59 | examples: |
7dbd0f54stainless-app[bot]1 years ago | 60 | timeout-minutes: 10 |
cdf6cd11stainless-app[bot]1 years ago | 61 | name: examples |
3c78e3a5stainless-app[bot]1 years ago | 62 | runs-on: ${{ github.repository == 'stainless-sdks/openai-java' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} |
3490819astainless-app[bot]1 years ago | 63 | if: github.repository == 'openai/openai-java' |
cdf6cd11stainless-app[bot]1 years ago | 64 | |
| 65 | steps: | |
| 66 | - uses: actions/checkout@v4 | |
| 67 | | |
| 68 | - name: Set up Java | |
| 69 | uses: actions/setup-java@v4 | |
| 70 | with: | |
| 71 | distribution: temurin | |
| 72 | java-version: | | |
| 73 | 8 | |
3c78e3a5stainless-app[bot]1 years ago | 74 | 21 |
cdf6cd11stainless-app[bot]1 years ago | 75 | cache: gradle |
| 76 | - name: Set up Gradle | |
| 77 | uses: gradle/gradle-build-action@v2 | |
af9f9a27Robert Craigie2 years ago | 78 | |
cdf6cd11stainless-app[bot]1 years ago | 79 | - env: |
| 80 | OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| 81 | run: | | |
| 82 | ./gradlew :openai-java-example:run |