Skip to content

Commit

Permalink
add zombienet-sdk test to parachain-template (#5342)
Browse files Browse the repository at this point in the history
Add new `CI` machinery to smoke test the `parachain-template-node` using
zombienet-sdk.
Thx!

---------

Co-authored-by: Przemek Rzad <przemek@parity.io>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Co-authored-by: rzadp <roopert7@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
  • Loading branch information
6 people authored Sep 16, 2024
1 parent 9064fb4 commit 9307d99
Show file tree
Hide file tree
Showing 7 changed files with 3,320 additions and 1,428 deletions.
17 changes: 17 additions & 0 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@ build-malus:
- echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
- cp -r ./docker/* ./artifacts

build-templates-node:
stage: build
extends:
- .docker-env
- .common-refs
- .run-immediately
- .collect-artifacts
script:
- time cargo build --locked --package parachain-template-node --release
- time cargo build --locked --package minimal-template-node --release
- time cargo build --locked --package solochain-template-node --release
# pack artifacts
- mkdir -p ./artifacts
- mv ./target/release/parachain-template-node ./artifacts/.
- mv ./target/release/minimal-template-node ./artifacts/.
- mv ./target/release/solochain-template-node ./artifacts/.

build-rustdoc:
stage: build
extends:
Expand Down
2 changes: 2 additions & 0 deletions .gitlab/pipeline/zombienet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ include:
- .gitlab/pipeline/zombienet/polkadot.yml
# bridges tests
- .gitlab/pipeline/zombienet/bridges.yml
# parachain-template-node tests
- .gitlab/pipeline/zombienet/parachain-template.yml
42 changes: 42 additions & 0 deletions .gitlab/pipeline/zombienet/parachain-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# common settings for all zombienet jobs
.zombienet-parachain-template-common:
before_script:
# add `./artifacts` to the PATH
- export PATH=$(pwd)/artifacts:$PATH
stage: zombienet
needs:
- job: build-linux-stable # polkadot binaries
artifacts: true
- job: build-templates-node # templates
artifacts: true
extends:
- .docker-env
- .zombienet-refs
variables:
ZOMBIE_PROVIDER: "native"
RUST_LOG: "info,zombienet_orchestrator=debug"
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
RUN_IN_CONTAINER: "1"
artifacts:
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}"
when: always
expire_in: 2 days
paths:
- ./zombienet-logs
after_script:
- mkdir -p ./zombienet-logs
- cp /tmp/zombie*/logs/* ./zombienet-logs/
retry: 2
timeout: 15m
tags:
- linux-docker

zombienet-parachain-template-smoke:
extends:
- .zombienet-parachain-template-common
script:
- echo $PATH
- ls -ltr $(pwd)/artifacts
- cargo test -p template-zombienet-tests --features zombienet --tests minimal_template_block_production_test
- cargo test -p template-zombienet-tests --features zombienet --tests parachain_template_block_production_test
# - cargo test -p template-zombienet-tests --features zombienet --tests solochain_template_block_production_test
Loading

0 comments on commit 9307d99

Please sign in to comment.