Skip to content

Enable go sdk to use the new restate-sdk-test-tool (#19) #114

Enable go sdk to use the new restate-sdk-test-tool (#19)

Enable go sdk to use the new restate-sdk-test-tool (#19) #114

Workflow file for this run

name: Go
on: [push]
permissions:
checks: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Install dependencies
run: go get .
- name: Vet
run: go vet -v ./...
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test -v ./...
sdk-test-suite:
runs-on: ubuntu-latest
name: "Integration Test (Test tool ${{ matrix.sdk-test-suite }})"
strategy:
matrix:
sdk-test-suite: [ "1.4" ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup ko
uses: ko-build/[email protected]
- name: Setup sdk-test-suite
run: wget --no-verbose https://github.com/restatedev/sdk-test-suite/releases/download/v${{ matrix.sdk-test-suite }}/restate-sdk-test-suite.jar
# Build docker image
- name: Install dependencies
run: go get .
- name: Build Docker image
run: KO_DOCKER_REPO=restatedev ko build -B -L github.com/restatedev/sdk-go/test-services
# Run test suite
- name: Run test suite
run: java -jar restate-sdk-test-suite.jar run --report-dir=test-report --exclusions-file test-services/exclusions.yaml restatedev/test-services
# Upload logs and publish test result
- uses: actions/upload-artifact@v4
if: always() # Make sure this is run even when test fails
with:
name: test-report
path: test-report
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-report/*/*.xml