-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
64 lines (59 loc) · 2 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: 'Restate SDK Test Suite'
description: 'Run the Restate SDK Test suite'
inputs:
envVars:
required: false
description: list of vars and values used when running the test tool
testArtifactOutput:
required: true
description: Name of the test artifact output to upload
restateContainerImage:
required: false
description: Container image to use for Restate
default: 'ghcr.io/restatedev/restate:main'
serviceContainerImage:
required: true
description: Container image to use for the service
exclusionsFile:
required: false
description: Exclusions file
outputs: {}
runs:
using: "composite"
steps:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Download tool
env:
# https://github.com/orgs/community/discussions/49245
GH_ACTION_REF: ${{ github.action_ref || github.ref_name }}
shell: bash
run: wget --no-verbose https://github.com/restatedev/sdk-test-suite/releases/download/$GH_ACTION_REF/restate-sdk-test-suite.jar
- name: Set environment variables
if: ${{ inputs.envVars }}
shell: bash
run: |
for env in "${{ inputs.envVars }}"
do
printf "%s\n" $env >> $GITHUB_ENV
done
- name: Run test suite
env:
RESTATE_CONTAINER_IMAGE: ${{ inputs.restateContainerImage }}
shell: bash
run: java -jar restate-sdk-test-suite.jar run ${{ inputs.exclusionsFile != '' && format('--exclusions-file={0}', inputs.exclusionsFile) || '' }} --report-dir=test-report ${{ inputs.serviceContainerImage }}
# Upload logs and publish test result
- uses: actions/upload-artifact@v4
if: always() # Make sure this is run even when test fails
with:
name: ${{ inputs.testArtifactOutput }}
path: test-report
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
test-report/*/*.xml