-
Notifications
You must be signed in to change notification settings - Fork 1
API-5887: Added PR build workflow to compile each SDK package upon PR opening #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
806b525
API-5887: added PR build workflow to compile each SDK package upon PR…
siddiquiharis b37ad89
API-5887: Added caching step for each SDK to reduce network downloads…
siddiquiharis 564beeb
API-5887: remove test step from build-typescript
siddiquiharis f6fded1
API-5887: upgrade action/cache version to v5.0.0 to use Nodejs24
siddiquiharis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| name: PR Build Check | ||
|
|
||
| # Runs a compile/build check for all SDK languages on every pull request. | ||
| # Jobs run in parallel and do not rely on Speakeasy-derived workflows. | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| build-typescript: | ||
| name: Build TypeScript SDK | ||
| runs-on: ubuntu-22.04-medium-arm64 | ||
| defaults: | ||
| run: | ||
| working-directory: packages/typescript | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e | ||
| with: | ||
| node-version: "24.x" | ||
|
|
||
| - name: Cache npm dependencies | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae | ||
| with: | ||
| path: ~/.npm | ||
| key: ${{ runner.os }}-npm-${{ hashFiles('packages/typescript/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-npm- | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install --ignore-scripts | ||
|
|
||
| - name: Lint | ||
| run: npm run lint | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| build-java: | ||
| name: Build Java SDK | ||
| runs-on: ubuntu-22.04-medium-arm64 | ||
| defaults: | ||
| run: | ||
| working-directory: packages/java | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 | ||
| with: | ||
| distribution: "corretto" | ||
| java-version: "11" | ||
|
|
||
| - name: Setup Gradle | ||
| uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e | ||
| with: | ||
| gradle-version: "8.14" | ||
| cache-read-only: ${{ github.event_name == 'pull_request' }} | ||
|
|
||
| - name: Build | ||
| run: ./gradlew build --no-daemon | ||
|
|
||
| build-csharp: | ||
| name: Build C# SDK | ||
| runs-on: ubuntu-22.04-medium-arm64 | ||
| defaults: | ||
| run: | ||
| working-directory: packages/csharp | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | ||
|
|
||
| - name: Setup .NET SDK | ||
| uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 | ||
| with: | ||
| dotnet-version: "8.x" | ||
|
|
||
| - name: Cache NuGet packages | ||
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae | ||
| with: | ||
| path: ~/.nuget/packages | ||
| key: ${{ runner.os }}-nuget-${{ hashFiles('packages/csharp/**/*.csproj') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-nuget- | ||
|
|
||
| - name: Build | ||
| run: dotnet build -c Release |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.