Skip to content

Commit 00534db

Browse files
Use service image
1 parent 39f6b05 commit 00534db

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/integration.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ on:
2020
required: false
2121
default: "ghcr.io/restatedev/restate:main"
2222
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
2328
workflow_call:
2429
inputs:
2530
restateCommit:
@@ -32,6 +37,11 @@ on:
3237
required: false
3338
default: "ghcr.io/restatedev/restate:main"
3439
type: string
40+
serviceImage:
41+
description: "service image, if provided it will skip building the image from sdk main branch"
42+
required: false
43+
default: ""
44+
type: string
3545

3646
jobs:
3747
sdk-test-suite:
@@ -86,11 +96,15 @@ jobs:
8696
docker tag "${output#*: }" "localhost/restatedev/restate-commit-download:latest"
8797
docker image ls -a
8898
99+
# Either build the docker image from source
89100
- name: Set up QEMU
101+
if: ${{ inputs.serviceImage == '' }}
90102
uses: docker/setup-qemu-action@v3
91103
- name: Set up Docker Buildx
104+
if: ${{ inputs.serviceImage == '' }}
92105
uses: docker/setup-buildx-action@v3
93106
- name: Build Python test-services image
107+
if: ${{ inputs.serviceImage == '' }}
94108
id: build
95109
uses: docker/build-push-action@v6
96110
with:
@@ -102,11 +116,17 @@ jobs:
102116
cache-from: type=gha,scope=${{ github.workflow }}
103117
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
104118

119+
# Or use the provided one
120+
- name: Pull test services image
121+
if: ${{ inputs.serviceImage != '' }}
122+
shell: bash
123+
run: docker pull ${{ inputs.serviceImage }}
124+
105125
- name: Run test tool
106126
uses: restatedev/sdk-test-suite@v3.2
107127
with:
108128
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
109-
serviceContainerImage: "restatedev/test-services-python"
129+
serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-python' }}
110130
exclusionsFile: "test-services/exclusions.yaml"
111131
testArtifactOutput: "sdk-python-integration-test-report"
112132
serviceContainerEnvFile: "test-services/.env"

0 commit comments

Comments
 (0)