|
20 | 20 | required: false |
21 | 21 | default: 'ghcr.io/restatedev/restate:main' |
22 | 22 | type: string |
| 23 | + serviceImage: |
| 24 | + description: "service image, if provided it will skip building the image from sdk main branch" |
| 25 | + required: false |
| 26 | + default: "" |
| 27 | + type: string |
23 | 28 | workflow_call: |
24 | 29 | inputs: |
25 | 30 | restateCommit: |
|
40 | 45 | required: false |
41 | 46 | type: string |
42 | 47 | description: name of the test artifact output |
| 48 | + serviceImage: |
| 49 | + description: "service image, if provided it will skip building the image from sdk main branch" |
| 50 | + required: false |
| 51 | + default: "" |
| 52 | + type: string |
43 | 53 |
|
44 | 54 | jobs: |
45 | 55 | sdk-test-suite: |
@@ -95,21 +105,30 @@ jobs: |
95 | 105 | docker image ls -a |
96 | 106 |
|
97 | 107 | - name: Setup Java |
| 108 | + if: ${{ inputs.serviceImage == '' }} |
98 | 109 | uses: actions/setup-java@v4 |
99 | 110 | with: |
100 | 111 | distribution: 'temurin' |
101 | 112 | java-version: '21' |
102 | 113 |
|
103 | 114 | - name: Setup Gradle |
| 115 | + if: ${{ inputs.serviceImage == '' }} |
104 | 116 | uses: gradle/actions/setup-gradle@v4 |
105 | 117 |
|
106 | 118 | - name: Build restatedev/test-services-java image |
| 119 | + if: ${{ inputs.serviceImage == '' }} |
107 | 120 | run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild |
108 | 121 |
|
| 122 | + # Pre-emptively pull the test-services image to avoid affecting execution time |
| 123 | + - name: Pull test services image |
| 124 | + if: ${{ inputs.serviceImage != '' }} |
| 125 | + shell: bash |
| 126 | + run: docker pull ${{ inputs.serviceImage }} |
| 127 | + |
109 | 128 | - name: Run test tool |
110 | 129 | uses: restatedev/sdk-test-suite@v3.2 |
111 | 130 | with: |
112 | 131 | envVars: ${{ inputs.envVars }} |
113 | 132 | testArtifactOutput: ${{ inputs.testArtifactOutput != '' && inputs.testArtifactOutput || 'sdk-java-integration-test-report' }} |
114 | 133 | restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }} |
115 | | - serviceContainerImage: 'restatedev/test-services-java' |
| 134 | + serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-java' }} |
0 commit comments