This commit is contained in:
Tanguy 2022-08-24 16:15:55 +02:00 committed by GitHub
parent 3574ef490d
commit 1c69daf469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 1 deletions

30
.github/workflows/example_test.yml vendored Normal file
View File

@ -0,0 +1,30 @@
on:
push:
name: test example
jobs:
run-example-test-plans:
name: "Run example plan"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Setup testground
uses: "libp2p/test-plans/.github/actions/setup-testground@master"
- uses: actions/checkout@v2
- name: Import the plan
run: testground plan import --name simple_tcp_ping --from examples/simple_tcp_ping
- name: Build the composition
env:
SdkGitRef: ${{ github.GITHUB_SHA }}
run: testground build composition -f examples/simple_tcp_ping/simple_composition.toml --wait
- name: Run the composition
env:
SdkGitRef: ${{ github.GITHUB_SHA }}
run: testground run composition -f examples/simple_tcp_ping/simple_composition.toml --wait

View File

@ -2,7 +2,8 @@ FROM nimlang/nim:alpine as builder
# "checkpoint" to avoid installing dependencies every time
# this is optional
RUN nimble install -y "https://github.com/status-im/testground-nim-sdk"
ARG SDK_GIT_REF="master"
RUN nimble install -y "https://github.com/status-im/testground-nim-sdk@#${SDK_GIT_REF}"
FROM builder
COPY . .

View File

@ -0,0 +1,28 @@
[metadata]
name = 'simple_tcp_ping'
author = ""
[global]
plan = "simple_tcp_ping"
case = "simple_tcp_ping"
total_instances = 0
builder = "docker:generic"
runner = "local:docker"
disable_metrics = false
[[groups]]
id = "a"
builder = "docker:generic"
[groups.resources]
memory = ""
cpu = ""
[groups.instances]
count = 2
percentage = 0.0
[groups.build_config]
enabled = true
[groups.build_config.build_args]
SDK_GIT_REF = '{{ or $.Env.SdkGitRef "master" }}'
[groups.build]
[groups.run]
artifact = ""