Skip to content

Commit

Permalink
Remove all stuff we don't need anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper committed Oct 4, 2024
1 parent 333ffcf commit 468088e
Show file tree
Hide file tree
Showing 55 changed files with 14 additions and 3,950 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/docker.yml

This file was deleted.

168 changes: 6 additions & 162 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,79 +1,37 @@
name: E2E

# Controls when the workflow will run
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 */6 * * *' # Every 6 hours
- cron: '0 */12 * * *' # Every 12 hours
workflow_dispatch: # To start from UI
inputs:
sdkTypescriptCommit:
description: 'sdk-typescript commit'
restateImage:
description: 'restate image'
required: false
default: ''
type: string
sdkJavaCommit:
description: 'sdk-java commit'
required: false
default: ''
type: string
restateCommit:
description: 'restate commit'
required: false
default: ''
type: string
workflow_call:
inputs:
sdkTypescriptCommit:
description: 'sdk-typescript commit'
required: false
default: ''
type: string
sdkJavaCommit:
description: 'sdk-java commit'
required: false
default: ''
type: string
restateCommit:
description: 'restate commit'
required: false
default: ''
type: string
e2eRef:
description: 'e2e repo ref, for cross-repo workflow calls'
required: true
default: 'ghcr.io/restatedev/restate:main'
type: string

jobs:
build:
# prevent e2e running on forks
if: github.repository_owner == 'restatedev'
runs-on: warp-ubuntu-latest-x64-16x
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
issues: read
checks: write
pull-requests: write
actions: read
services:
registry:
# if we are building a restate snapshot, start a local docker registry to store it
# an empty image skips the service (see https://github.com/actions/runner/issues/822)
image: ${{ inputs.restateCommit != '' && 'registry:2' || '' }}
ports:
- 5000:5000
steps:
- uses: actions/checkout@v4
with:
repository: restatedev/e2e
path: e2e
# if we are in a workflow_call, use the e2e branch from the workflow call (usually main)
# otherwise, defer to the checkout actions default, which depends on the triggering event
ref: ${{ inputs.e2eRef || '' }}

- name: "Check license headers"
run: "./check-license-headers"
Expand All @@ -84,119 +42,6 @@ jobs:
with:
distribution: 'temurin'
java-version: '17'

# Setup node
- uses: actions/setup-node@v4
with:
node-version: "18.x"
registry-url: 'https://registry.npmjs.org'

# Setup sdk-typescript 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 sdk-typescript snapshot from in-progress workflow
if: ${{ inputs.sdkTypescriptCommit != '' && github.event_name != 'workflow_dispatch' }}
uses: actions/download-artifact@v4
with:
name: restatedev-restate-sdk
path: e2e/services/node-services

- name: Download sdk-typescript-clients snapshot from in-progress workflow
if: ${{ inputs.sdkTypescriptCommit != '' && github.event_name != 'workflow_dispatch' }}
uses: actions/download-artifact@v4
with:
name: restatedev-restate-sdk-clients
path: e2e/services/node-services
- name: Download sdk-typescript-core snapshot from in-progress workflow
if: ${{ inputs.sdkTypescriptCommit != '' && github.event_name != 'workflow_dispatch' }}
uses: actions/download-artifact@v4
with:
name: restatedev-restate-sdk-core
path: e2e/services/node-services


# In the workflow dispatch case where the artifact was created in a previous run, we can download as normal
- name: download sdk-typescript snapshot from completed workflow
if: ${{ inputs.sdktypescriptcommit != '' && github.event_name == 'workflow_dispatch' }}
uses: dawidd6/action-download-artifact@v3
with:
workflow: test.yml
repo: restatedev/sdk-typescript
commit: ${{ inputs.sdktypescriptcommit }}
name: restatedev-restate-sdk
path: e2e/services/node-services

- name: download sdk-typescript-clients snapshot from completed workflow
if: ${{ inputs.sdktypescriptcommit != '' && github.event_name == 'workflow_dispatch' }}
uses: dawidd6/action-download-artifact@v3
with:
workflow: test.yml
repo: restatedev/sdk-typescript
commit: ${{ inputs.sdktypescriptcommit }}
name: restatedev-restate-sdk-clients
path: e2e/services/node-services
- name: download sdk-typescript-core snapshot from completed workflow
if: ${{ inputs.sdktypescriptcommit != '' && github.event_name == 'workflow_dispatch' }}
uses: dawidd6/action-download-artifact@v3
with:
workflow: test.yml
repo: restatedev/sdk-typescript
commit: ${{ inputs.sdktypescriptcommit }}
name: restatedev-restate-sdk-core
path: e2e/services/node-services

- name: Install sdk-typescript-core snapshot
if: ${{ inputs.sdkTypescriptCommit != '' }}
run: npm install restatedev-restate-sdk-core.tgz
working-directory: e2e/services/node-services

- name: Install sdk-typescript snapshot
if: ${{ inputs.sdkTypescriptCommit != '' }}
run: npm install restatedev-restate-sdk.tgz
working-directory: e2e/services/node-services

- name: Install sdk-typescript-clients snapshot
if: ${{ inputs.sdkTypescriptCommit != '' }}
run: npm install restatedev-restate-sdk-clients.tgz
working-directory: e2e/services/node-services

# Setup sdk-java snapshot if necessary
- name: Checkout sdk-java repo
uses: actions/checkout@v4
if: ${{ inputs.sdkJavaCommit != '' }}
with:
repository: restatedev/sdk-java
# if we are in a workflow_call, use the e2e branch from the workflow call (usually main)
# otherwise, defer to the checkout actions default, which depends on the triggering event
ref: ${{ inputs.sdkJavaCommit }}
path: "sdk-java"

# 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)
docker tag "${output#*: }" "localhost:5000/restatedev/restate:latest"
docker push localhost:5000/restatedev/restate:latest
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

Expand All @@ -205,8 +50,7 @@ jobs:
env:
E2E_IMAGE_PULL_POLICY: always
E2E_VERIFICATION_SEED: ${{ github.run_id }}
RESTATE_CONTAINER_IMAGE: ${{ inputs.restateCommit != '' && 'localhost:5000/restatedev/restate:latest' || '' }}
SDK_JAVA_LOCAL_BUILD: ${{ inputs.sdkJavaCommit != '' && 'true' || '' }}
RESTATE_CONTAINER_IMAGE: ${{ inputs.restateImage }}
working-directory: e2e
run: ./gradlew --continue -Djib.console=plain check

Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/verification.yaml

This file was deleted.

16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# e2e
E2E tests for Restate

**DEPRECATED**: Please add new tests to https://github.com/restatedev/sdk-test-suite

## Modules

* `services` contains a collection of services for e2e testing:
* [`node-services`](services/node-services) contains the Node SDK services
* [`java-services`](services/java-services) contains the Java SDK services
* `test-utils` contains utilities to develop e2e tests
* `tests` contains the test code
Expand Down Expand Up @@ -76,19 +77,6 @@ When building the `e2e` project you have to set the environment variable `SDK_JA
to include `sdk-java` as a composite build and substitute the `dev.restate.sdk:sdk-java` dependency with it.
The build will fail if Gradle cannot find the `sdk-java` project.

### How to test Typescript SDK changes

In order to test local changes to the `sdk-typescript`, you need to check it out under `../sdk-typescript`.
Then run:

```shell
gradle :services:node-services:installLocalSdkTypescript
```

This will build the Typescript SDK, pack it with `npm pack`, and copy it over to the node-services directory and install it.

You can include `gradle :services:node-services:installLocalSdkTypescript` in the build process by setting `SDK_TYPESCRIPT_LOCAL_BUILD=true`.

### How to test Restate runtime changes

You can manually build a docker image in the restate project using `just docker`. Then set the environment variable `RESTATE_CONTAINER_IMAGE` with the tag of the newly created image (printed at the end of the docker build log).
Expand Down
21 changes: 0 additions & 21 deletions contracts-kt/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 468088e

Please sign in to comment.