openai/openai-java

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
875effb88785eae2cdbcdf169f7857e692612981

Branches

Tags

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

Clone

HTTPS

Download ZIP

.github/workflows/detect-breaking-changes.yml

39lines · modecode

1name: CI
2on:
3 pull_request:
4 branches:
5 - main
6 - next
7
8jobs:
9 detect_breaking_changes:
10 runs-on: 'ubuntu-latest'
11 name: detect-breaking-changes
12 if: github.repository == 'openai/openai-java'
13 steps:
14 - name: Calculate fetch-depth
15 run: |
16 echo "FETCH_DEPTH=$(expr ${{ github.event.pull_request.commits }} + 1)" >> $GITHUB_ENV
17
18 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
19 with:
20 # Ensure we can check out the pull request base in the script below.
21 fetch-depth: ${{ env.FETCH_DEPTH }}
22
23 - name: Set up Java
24 uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
25 with:
26 distribution: temurin
27 java-version: |
28 8
29 21
30 cache: gradle
31 - name: Set up Gradle
32 uses: gradle/gradle-build-action@fe583dc97e032f41ccc310ea5176f2d7306abbc4 # v2
33
34 - name: Detect breaking changes
35 run: |
36 # Try to check out previous versions of the breaking change detection script. This ensures that
37 # we still detect breaking changes when entire files and their tests are removed.
38 git checkout "${{ github.event.pull_request.base.sha }}" -- ./scripts/detect-breaking-changes 2>/dev/null || true
39 ./scripts/detect-breaking-changes ${{ github.event.pull_request.base.sha }}