Skip to content

Commit

Permalink
Test zombie-tests job
Browse files Browse the repository at this point in the history
  • Loading branch information
qdrvm-ci committed Jun 24, 2024
1 parent e1ab5dc commit 0c64d8f
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 45 deletions.
107 changes: 63 additions & 44 deletions .github/workflows/zombie-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,50 +94,69 @@ jobs:
BUILD_TYPE=${{ github.event.inputs.build_type }}
# Zombie-Tests:
# runs-on: [ actions-runner-controller ]
# timeout-minutes: 60
# needs: [kagome_dev_docker_build]
# strategy:
# fail-fast: false
# matrix:
# options:
# - name: "PVF preparation & execution time"
# test: "test-polkadot-functional-0001-parachains-pvf"
# - name: "Disputes initiation, conclusion and lag"
# test: "test-polkadot-functional-0002-parachains-disputes"
# - name: "BEEFY voting and finality, test MMR proofs. Assumes Rococo sessions of 1 minute"
# test: "test-polkadot-functional-0003-beefy-and-mmr"
# - name: "Dispute finality lag when 1/3 of parachain validators always attempt to include an invalid block"
# test: "test-polkadot-functional-0004-parachains-garbage-candidate"
# - name: "Past-session dispute slashing"
# test: "test-polkadot-functional-0005-parachains-disputes-past-session"
# - name: "Test if parachains make progress with most of approvals being tranch0"
# test: "test-polkadot-functional-0006-parachains-max-tranche0"
# - name: "Test if disputes triggered on finalized blocks within scope always end as valid"
# test: "test-polkadot-functional-0007-dispute-freshly-finalized"
# - name: "Test if disputes triggered on finalized blocks out of scope never get to be confirmed and concluded"
# test: "test-polkadot-functional-0008-dispute-old-finalized"
# - name: "Approval voting coalescing does not lag finality"
# test: "test-polkadot-functional-0009-approval-voting-coalescing"
# - name: "Test validator disabling effects"
# test: "test-polkadot-functional-0010-validator-disabling"
# - name: "Test we are producing blocks at 6 seconds clip"
# test: "test-polkadot-functional-0011-async-backing-6-seconds-rate"
# steps:
# - uses: actions/checkout@v4
# - name: "Get Polkadot and Zombienet versions"
# working-directory: ./housekeeping/docker/kagome-dev
# run: make get_versions
# - name: Run test
# working-directory: ./zombienet/docker
# run: make ${{ matrix.options.test }} ZOMBIE_TESTER_IMAGE=${DOCKER_REGISTRY_PATH}zombie-tester:latest
# - name: Upload test logs as artifact
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: logs-${{ matrix.options.test }}
# path: /tmp/test_logs
Zombie-Tests:
runs-on: ubuntu-latest
timeout-minutes: 60
needs: [kagome_dev_docker_build]
strategy:
fail-fast: false
matrix:
options:
- name: "PVF preparation & execution time"
test: "test-polkadot-functional-0001-parachains-pvf"
- name: "Disputes initiation, conclusion and lag"
test: "test-polkadot-functional-0002-parachains-disputes"
- name: "BEEFY voting and finality, test MMR proofs. Assumes Rococo sessions of 1 minute"
test: "test-polkadot-functional-0003-beefy-and-mmr"
- name: "Dispute finality lag when 1/3 of parachain validators always attempt to include an invalid block"
test: "test-polkadot-functional-0004-parachains-garbage-candidate"
- name: "Past-session dispute slashing"
test: "test-polkadot-functional-0005-parachains-disputes-past-session"
- name: "Test if parachains make progress with most of approvals being tranch0"
test: "test-polkadot-functional-0006-parachains-max-tranche0"
- name: "Test if disputes triggered on finalized blocks within scope always end as valid"
test: "test-polkadot-functional-0007-dispute-freshly-finalized"
- name: "Test if disputes triggered on finalized blocks out of scope never get to be confirmed and concluded"
test: "test-polkadot-functional-0008-dispute-old-finalized"
- name: "Approval voting coalescing does not lag finality"
test: "test-polkadot-functional-0009-approval-voting-coalescing"
- name: "Test validator disabling effects"
test: "test-polkadot-functional-0010-validator-disabling"
- name: "Test we are producing blocks at 6 seconds clip"
test: "test-polkadot-functional-0011-async-backing-6-seconds-rate"
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Get Polkadot and Zombienet versions"
working-directory: ./housekeeping/docker/kagome-dev
run: make get_versions

- name: "Get Package Version"
working-directory: ./housekeeping/docker/kagome-dev
run: |
ARTIFACTS_REPO=$(grep '^ARTIFACTS_REPO ?=' Makefile | sed 's/ARTIFACTS_REPO ?= //')
REGION=$(grep '^REGION ?=' Makefile | sed 's/REGION ?= //')
SHORT_COMMIT_HASH=$(grep 'short_commit_hash:' commit_hash.txt | cut -d ' ' -f 2)
PACKAGE_VERSION="$(date +'%d.%m.%y')-${SHORT_COMMIT_HASH}-${{ github.event.inputs.build_type }}"
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
echo "package_version=${PACKAGE_VERSION}" >> $GITHUB_ENV
- name: "Get Zombie Tester Version"
run: |
ZOMBIE_TESTER_IMAGE=${DOCKER_REGISTRY_PATH}zombie-tester:latest
echo "zombie_tester_image=${ZOMBIE_TESTER_IMAGE}"
- name: "Run test"
working-directory: ./zombienet/docker
run: make ${{ matrix.options.test }} ZOMBIE_TESTER_IMAGE=${{ env.zombie_tester_image }} KAGOME_PACKAGE_VERSION=${{ env.PACKAGE_VERSION }}

- name: "Upload test logs as artifact"
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.options.test }}
path: /tmp/test_logs

# Prepare-Kagome-Docker:
# strategy:
Expand Down
9 changes: 8 additions & 1 deletion zombienet/docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RESULT_BINARIES=./target/testnet/malus ./target/testnet/undying-collator ./targe
RESULT_BIN_NAMES=malus undying-collator adder-collator

POLKADOT_BINARY_PACKAGE_VERSION ?=
KAGOME_PACKAGE_VERSION ?=

export DOCKER_BUILDKIT=1
# BUILDKIT_PROGRESS - auto, plain, tty, rawjson
Expand Down Expand Up @@ -48,7 +49,13 @@ POLKADOT_RELEASE_GLOBAL ?= v0.9.42
define run_test
@CONTAINER_NAME=$$(openssl rand -hex 6); \
echo "Running test in container $$CONTAINER_NAME with params image:$(1), test:$(2)"; \
docker run --name $$CONTAINER_NAME --platform linux/amd64 $(1) "zombienet-linux-x64 test -p native $(2)"; \
docker run --name $$CONTAINER_NAME --platform linux/amd64 \
-u root \
-v ./kagome:/home/nonroot/bin/kagome \
-v $(GOOGLE_APPLICATION_CREDENTIALS):/root/.gcp/google_creds.json \
$(1) "sed -i '1s/^#//' /etc/apt/sources.list.d/kagome.list && \
install_packages kagome-dev=$(KAGOME_PACKAGE_VERSION) && \
zombienet-linux-x64 test -p native $(2)"; \
TEST_EXIT_CODE=$$(docker inspect $$CONTAINER_NAME --format='{{.State.ExitCode}}'); \
if [ "$(COPY_LOGS_TO_HOST)" = "true" ]; then \
$(MAKE) copy_logs_to_host CONTAINER_NAME=$$CONTAINER_NAME; \
Expand Down

0 comments on commit 0c64d8f

Please sign in to comment.