Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run testplan on in CI #137

Merged
merged 15 commits into from
Dec 22, 2020
51 changes: 51 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,52 @@ version: 2.1
orbs:
ci-go: ipfs/[email protected]

executors:
golang:
docker:
- image: circleci/golang:1.15.5
resource_class: 2xlarge
ubuntu:
docker:
- image: ubuntu:19.10

commands:
prepare:
steps:
- checkout
- git_fetch_all_tags
- checkout
git_fetch_all_tags:
steps:
- run:
name: fetch all tags
command: |
git fetch --all

jobs:
trigger-testplans:
description: |
Trigger `graphsync` test cases on TaaS
parameters: &test-params
executor:
type: executor
default: golang
executor: << parameters.executor >>
steps:
- prepare
- run:
name: "download testground"
command: wget https://gist.github.com/nonsense/5fbf3167cac79945f658771aed32fc44/raw/2e17eb0debf7ec6bdf027c1bdafc2c92dd97273b/testground-d3e9603 -O ~/testground-cli && chmod +x ~/testground-cli
- run:
name: "prepare .env.toml"
command: pushd testplans/graphsync && mkdir -p $HOME/testground && cp env-ci.toml $HOME/testground/.env.toml && echo 'endpoint="https://ci.testground.ipfs.team"' >> $HOME/testground/.env.toml && echo 'user="circleci"' >> $HOME/testground/.env.toml
- run:
name: "prepare testground home dir"
command: mkdir -p $HOME/testground/plans && mv testplans/graphsync $HOME/testground/plans/
- run:
name: "trigger graphsync testplan on taas"
command: ~/testground-cli run composition -f $HOME/testground/plans/graphsync/stress-k8s.toml --metadata-commit=$CIRCLE_SHA1 --metadata-repo=ipfs/go-graphsync --metadata-branch=$CIRCLE_BRANCH

workflows:
version: 2
test:
Expand All @@ -12,6 +58,11 @@ workflows:
- ci-go/test:
race: true
name: "ci-go/test/race"
- trigger-testplans:
filters:
branches:
only:
- master
#- ci-go/benchmark:
# tolerance: 50
# requires:
Expand Down
1 change: 1 addition & 0 deletions testplans/graphsync/env-ci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[client]
35 changes: 35 additions & 0 deletions testplans/graphsync/stress-k8s.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[metadata]
name = "stress"

[global]
plan = "graphsync"
case = "stress"
total_instances = 2
builder = "docker:go"
runner = "cluster:k8s"

[global.build_config]
push_registry=true
go_proxy_mode="remote"
go_proxy_url="http://localhost:8081"
registry_type="aws"

[global.run.test_params]
size = "10MB"
latencies = '["50ms", "100ms", "200ms"]'
bandwidths = '["32MiB", "16MiB", "8MiB", "4MiB", "1MiB"]'
concurrency = "10"

[[groups]]
id = "providers"
instances = { count = 1 }
[groups.resources]
memory = "4096Mi"
cpu = "1000m"

[[groups]]
id = "requestors"
instances = { count = 1 }
[groups.resources]
memory = "4096Mi"
cpu = "1000m"