Skip to content

Integration

Integration #714

Workflow file for this run

name: Integration
# Controls when the workflow will run
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 */6 * * *' # Every 6 hours
workflow_dispatch:
inputs:
restateCommit:
description: 'restate commit'
required: false
default: ''
type: string
restateImage:
description: 'restate image, superseded by restate commit'
required: false
default: 'ghcr.io/restatedev/restate:main'
type: string
workflow_call:
inputs:
restateCommit:
description: 'restate commit'
required: false
default: ''
type: string
restateImage:
description: 'restate image, superseded by restate commit'
required: false
default: 'ghcr.io/restatedev/restate:main'
type: string
jobs:
sdk-test-suite:
if: github.repository_owner == 'restatedev'
runs-on: ubuntu-latest
name: Features integration test
permissions:
contents: read
issues: read
checks: write
pull-requests: write
actions: read
steps:
- uses: actions/checkout@v4
with:
repository: restatedev/sdk-python
- name: Set up Docker containerd snapshotter
uses: crazy-max/ghaction-setup-docker@v3
with:
set-host: true
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
### Download the Restate container image, if needed
# Setup restate snapshot if necessary
# Due to https://github.com/actions/upload-artifact/issues/53
# We must use download-artifact to get artifacts created during *this* workflow run, ie by workflow call
- name: Download restate snapshot from in-progress workflow
if: ${{ inputs.restateCommit != '' && github.event_name != 'workflow_dispatch' }}
uses: actions/download-artifact@v4
with:
name: restate.tar
# In the workflow dispatch case where the artifact was created in a previous run, we can download as normal
- name: Download restate snapshot from completed workflow
if: ${{ inputs.restateCommit != '' && github.event_name == 'workflow_dispatch' }}
uses: dawidd6/action-download-artifact@v3
with:
repo: restatedev/restate
workflow: ci.yml
commit: ${{ inputs.restateCommit }}
name: restate.tar
- name: Install restate snapshot
if: ${{ inputs.restateCommit != '' }}
run: |
output=$(docker load --input restate.tar | head -n 1)
docker tag "${output#*: }" "localhost/restatedev/restate-commit-download:latest"
docker image ls -a
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Python test-services image
id: build
uses: docker/build-push-action@v6
with:
context: .
file: "test-services/Dockerfile"
push: false
load: true
tags: restatedev/python-test-services
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
- name: Run test tool
uses: restatedev/[email protected]
with:
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
serviceContainerImage: "restatedev/python-test-services"
exclusionsFile: "test-services/exclusions.yaml"
testArtifactOutput: "sdk-python-integration-test-report"