Skip to content

Commit

Permalink
Run testplan on in CI (#137)
Browse files Browse the repository at this point in the history
* try to run test plan on ci

* remove broken parameters option

* move workflow definition to bottom

* put job definition in jobs group

* remove undefined executor configuration

* use go-test tools and restore parameterization

* define executor explicitly

* define executor through parameters

* back to ci-go

* remove extraneous steps

* add prepare step

* fix path to test definition

* fix whitespace

* add k8s test and use it in ci

* trigger testplan only on merge to master

Co-authored-by: acruikshank <[email protected]>
  • Loading branch information
acruikshank and acruikshank authored Dec 22, 2020
1 parent 1bdc558 commit 43d46f0
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
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"

0 comments on commit 43d46f0

Please sign in to comment.