Add CI (#2)
This commit is contained in:
parent
3574ef490d
commit
1c69daf469
|
@ -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
|
|
@ -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 . .
|
||||
|
|
|
@ -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 = ""
|
Loading…
Reference in New Issue