|
11 | 11 | description: 'sdk-java version (without prepending v). Leave empty if you do not want to update it.'
|
12 | 12 | required: false
|
13 | 13 | type: string
|
| 14 | + cdkVersion: |
| 15 | + description: 'cdk version (without prepending v). Leave empty if you do not want to update it.' |
| 16 | + required: false |
| 17 | + type: string |
14 | 18 |
|
15 | 19 | jobs:
|
16 | 20 | updates:
|
|
53 | 57 | - name: Find and replace restateVersion in build.gradle.kts for kotlin templates
|
54 | 58 | if: github.event.inputs.sdkJavaVersion != ''
|
55 | 59 | run: for jvmDir in hello-world-http hello-world-lambda; do sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/$jvmDir/build.gradle.kts; done
|
| 60 | + - name: Find and replace restateVersion in build.gradle.kts for kotlin/hello-world-lambda-cdk |
| 61 | + if: github.event.inputs.sdkJavaVersion != '' |
| 62 | + run: sed -i 's/val restateVersion = "[0-9A-Z.-]*"/val restateVersion = "${{ inputs.sdkJavaVersion }}"/' kotlin/hello-world-lambda-cdk/lambda/build.gradle.kts |
56 | 63 |
|
57 | 64 | # When adding a new example add the check task here
|
58 | 65 | - name: Test java/hello-world-http
|
@@ -80,11 +87,15 @@ jobs:
|
80 | 87 | arguments: check
|
81 | 88 | build-root-directory: kotlin/hello-world-lambda
|
82 | 89 |
|
| 90 | + - name: Update cdk version |
| 91 | + if: github.event.inputs.cdkVersion != '' |
| 92 | + run: npm --prefix kotlin/hello-world-lambda-cdk install @restatedev/restate-cdk@^${{ inputs.cdkVersion }} |
| 93 | + |
83 | 94 | # CDK projects are a hybrid of TypeScript CDK stack + platform-specific handler code; the top-level npm CDK build
|
84 |
| - # is responsible for verifying the language-specific handler cod. They are also not a part of the TypeScript |
| 95 | + # is responsible for verifying the language-specific handler code. They are also not a part of the TypeScript |
85 | 96 | # examples workspace, so we test them separately here.
|
86 | 97 | - name: Test kotlin/hello-world-lambda-cdk
|
87 |
| - if: github.event.inputs.sdkTypescriptVersion != '' && github.event.inputs.sdkJavaVersion != '' |
| 98 | + if: github.event.inputs.cdkVersion != '' || github.event.inputs.sdkJavaVersion != '' |
88 | 99 | run: |
|
89 | 100 | npm --prefix kotlin/hello-world-lambda-cdk install
|
90 | 101 | npm --prefix kotlin/hello-world-lambda-cdk run verify
|
|
0 commit comments