Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
name: Bump release version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Install dasel
run: curl -sSLf "$(curl -sSLf https://api.github.com/repos/tomwright/dasel/releases/latest | grep browser_download_url | grep linux_amd64 | grep -v .gz | cut -d\" -f 4)" -L -o dasel && chmod +x dasel && mv ./dasel /usr/local/bin/dasel
run: curl -sSLf "https://github.com/tomwright/dasel/releases/download/v2.8.1/dasel_linux_amd64" -L -o dasel && chmod +x dasel && mv ./dasel /usr/local/bin/dasel
- name: Bump version overwriting libs.versions.toml
run: dasel -f gradle/libs.versions.toml put -t string -v "${{ github.event.inputs.version }}" ".versions.restate"
run: dasel put -f gradle/libs.versions.toml -t string -v "${{ github.event.inputs.version }}" 'versions.restate'
- name: Create version bump PR
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v8
with:
title: "[Release] Bump to ${{ github.event.inputs.version }}"
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/dependency-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
java-version: 25
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: sdk-core/src/main/rust
- name: Generate and submit dependency graph
uses: gradle/actions/dependency-submission@v4
uses: gradle/actions/dependency-submission@v6
33 changes: 21 additions & 12 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,42 @@ jobs:
sdk-test-docker:
if: github.repository_owner == 'restatedev'
runs-on: warp-ubuntu-latest-x64-4x
name: "Create test-services Docker Image"

name: "Create test-services Docker Image (JRE ${{ matrix.jreVersion }})"
strategy:
fail-fast: false
matrix:
jreVersion: [ 17, 21, 25 ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
repository: restatedev/sdk-java

- name: Setup Java
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v6

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: sdk-core/src/main/rust

- name: Log into GitHub container registry
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
registry: ${{ env.GHCR_REGISTRY }}
username: ${{ env.GHCR_REGISTRY_USERNAME }}
password: ${{ env.GHCR_REGISTRY_TOKEN }}

- name: Build restatedev/test-services-java image
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild
- name: Build restatedev/test-services-java image (JRE ${{ matrix.jreVersion }})
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}

- name: Push restatedev/test-services-java:main image
- name: Push restatedev/test-services-java image
run: |
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main
docker push ghcr.io/restatedev/test-services-java:main
docker tag restatedev/test-services-java ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
docker push ghcr.io/restatedev/test-services-java:main-jre${{ matrix.jreVersion }}
115 changes: 115 additions & 0 deletions .github/workflows/integration-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Integration (internal)

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

jobs:
sdk-test-suite:
if: github.repository_owner == 'restatedev'
runs-on: warp-ubuntu-latest-x64-4x
name: "Features integration test (JRE ${{ matrix.jreVersion }})"
strategy:
fail-fast: false
matrix:
jreVersion: [ 17, 21, 25 ]
permissions:
contents: read
issues: read
checks: write
pull-requests: write
actions: read

steps:
- uses: actions/checkout@v6
with:
repository: restatedev/sdk-java

- name: Set up Docker containerd snapshotter
uses: docker/setup-docker-action@v5
with:
version: "v28.5.2"
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@v8
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@v21
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: Setup Java
if: ${{ inputs.serviceImage == '' }}
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'

- name: Setup Gradle
if: ${{ inputs.serviceImage == '' }}
uses: gradle/actions/setup-gradle@v6

- name: Install Rust toolchain
if: ${{ inputs.serviceImage == '' }}
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: sdk-core/src/main/rust

- name: Build restatedev/test-services-java image
if: ${{ inputs.serviceImage == '' }}
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}

# Pre-emptively pull the test-services image to avoid affecting execution time
- name: Pull test services image
if: ${{ inputs.serviceImage != '' }}
shell: bash
run: docker pull ${{ inputs.serviceImage }}

- name: Run test tool
continue-on-error: ${{ inputs.continueOnError == 'true' }}
uses: restatedev/e2e/sdk-tests@v2.1
with:
envVars: ${{ inputs.envVars }}
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && format('{0}-jre{1}', inputs.testArtifactOutput, matrix.jreVersion) || format('sdk-java-jre{0}-integration-test-report', matrix.jreVersion) }}
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-java' }}
50 changes: 16 additions & 34 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
name: Integration
name: Integration (external)

# 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
serviceImage:
description: "service image, if provided it will skip building the image from sdk main branch"
required: false
default: ""
type: string
workflow_call:
inputs:
restateCommit:
Expand Down Expand Up @@ -71,12 +47,12 @@ jobs:
actions: read

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
repository: restatedev/sdk-java

- name: Set up Docker containerd snapshotter
uses: docker/setup-docker-action@v4
uses: docker/setup-docker-action@v5
with:
version: "v28.5.2"
set-host: true
Expand All @@ -93,13 +69,13 @@ jobs:
# 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
uses: actions/download-artifact@v8
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
uses: dawidd6/action-download-artifact@v21
with:
repo: restatedev/restate
workflow: ci.yml
Expand All @@ -114,18 +90,24 @@ jobs:

- name: Setup Java
if: ${{ inputs.serviceImage == '' }}
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'

- name: Setup Gradle
if: ${{ inputs.serviceImage == '' }}
uses: gradle/actions/setup-gradle@v4
uses: gradle/actions/setup-gradle@v6

- name: Install Rust toolchain
if: ${{ inputs.serviceImage == '' }}
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-workspaces: sdk-core/src/main/rust

- name: Build restatedev/test-services-java image
if: ${{ inputs.serviceImage == '' }}
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild
run: ./gradlew -Djib.console=plain :test-services:jibDockerBuild -PtestServicesJre=${{ matrix.jreVersion }}

# Pre-emptively pull the test-services image to avoid affecting execution time
- name: Pull test services image
Expand All @@ -138,6 +120,6 @@ jobs:
uses: restatedev/e2e/sdk-tests@v2.1
with:
envVars: ${{ inputs.envVars }}
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && inputs.testArtifactOutput || 'sdk-java-integration-test-report' }}
testArtifactOutput: ${{ inputs.testArtifactOutput != '' && format('{0}-jre{1}', inputs.testArtifactOutput, matrix.jreVersion) || format('sdk-java-jre{0}-integration-test-report', matrix.jreVersion) }}
restateContainerImage: ${{ inputs.restateCommit != '' && 'localhost/restatedev/restate-commit-download:latest' || (inputs.restateImage != '' && inputs.restateImage || 'ghcr.io/restatedev/restate:main') }}
serviceContainerImage: ${{ inputs.serviceImage != '' && inputs.serviceImage || 'restatedev/test-services-java' }}
Loading
Loading