Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nahuseyoum authored Dec 30, 2024
2 parents 2fe3d32 + ae6f741 commit f13b337
Show file tree
Hide file tree
Showing 48 changed files with 948 additions and 828 deletions.
14 changes: 7 additions & 7 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
queue_rules:
- name: default
conditions:
queue_conditions:
- check-success=all
- label=automerge
- base=main
- "#changes-requested-reviews-by=0"
- "#approved-reviews-by>=1"

pull_request_rules:
- name: automatic merge when CI passes on main
conditions:
merge_conditions:
- check-success=all
- label=automerge
- base=main
- "#changes-requested-reviews-by=0"
- "#approved-reviews-by>=1"
merge_method: merge

pull_request_rules:
- name: automatic merge when CI passes on main
conditions: []
actions:
queue:
name: default
method: merge
33 changes: 33 additions & 0 deletions .github/workflows/arc-runner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test ARC Runner

on:
workflow_dispatch:

jobs:
test-arc-runner:
runs-on: zombienet-arc-runner
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js environment
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: ./test-results/

- name: Notify on completion
if: always()
run: echo "Test completed on zombienet-arc-runner"
2 changes: 2 additions & 0 deletions .github/workflows/build-release-manual-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
node-version: '18'
- run: npm install
working-directory: "./javascript"
- run: npm dedupe
working-directory: "./javascript"
- run: npm run build
working-directory: "./javascript"
- run: npm run package:linux
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/gitspiegel-trigger.yml

This file was deleted.

229 changes: 229 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
name: Zombienet Integration Tests

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

env:
IMAGE_NAME: paritypr/zombienet
VERSION: ${{ github.sha }}
RUN_IN_CONTAINER: 1
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"

jobs:
build_push_image:
name: Build and Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: npm build
run: |
cd javascript
npm install
npm dedupe
npm run clean
npm run build
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:latest
set-variables:
name: Set variables
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.version.outputs.IMAGE }}
DEBUG: ${{ steps.env.outputs.DEBUG }}
ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ steps.env.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }}
COL_IMAGE: ${{ steps.env.outputs.COL_IMAGE }}
CUMULUS_TEST_IMAGE: ${{ steps.env.outputs.CUMULUS_TEST_IMAGE }}
steps:
- name: Define version
id: version
run: |
export IMAGE="${{ env.IMAGE_NAME }}:${{ env.VERSION }}"
echo "IMAGE=${IMAGE}" >> $GITHUB_OUTPUT
echo "set IMAGE=${IMAGE}"
- name: Define env
id: env
run: |
if [[ ${{ github.run_attempt }} -gt 1 ]]; then
# more debug in rerun
export DEBUG=zombie,zombie::js-helpers*,zombie::network-node,zombie::kube::client::logs
else
export DEBUG=zombie
fi;
echo "DEBUG=${DEBUG}" >> $GITHUB_OUTPUT
echo "set DEBUG=${DEBUG}"
export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master"
echo "ZOMBIENET_INTEGRATION_TEST_IMAGE=${ZOMBIENET_INTEGRATION_TEST_IMAGE}" >> $GITHUB_OUTPUT
echo "set ZOMBIENET_INTEGRATION_TEST_IMAGE=${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
export COL_IMAGE="docker.io/paritypr/colander:master"
echo "COL_IMAGE=${COL_IMAGE}" >> $GITHUB_OUTPUT
echo "set COL_IMAGE=${COL_IMAGE}"
# TODO: add script to get latest from dockerhub
export CUMULUS_TEST_IMAGE="docker.io/paritypr/test-parachain:c90f9713b5bc73a9620b2e72b226b4d11e018190"
echo "CUMULUS_TEST_IMAGE=${CUMULUS_TEST_IMAGE}" >> $GITHUB_OUTPUT
echo "set CUMULUS_TEST_IMAGE=${CUMULUS_TEST_IMAGE}"
zombienet-smoke:
name: Zombienet Smoke
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
DEBUG: ${{ needs.set-variables.outputs.DEBUG }}
ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }}
COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }}
CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: smoke test
run: |
echo "Zombienet Tests"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests" --test="0001-smoke.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-smoke
path: |
/tmp/zombie*/logs/*
zombienet-scale-net-config:
name: Zombienet Scale net
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
DEBUG: ${{ needs.set-variables.outputs.DEBUG }}
ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }}
COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }}
CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: scale-net test
run: |
echo "Zombienet Scale Net"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/scale-net" --test="0001-scale-net.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-scale-net
path: |
/tmp/zombie*/logs/*
zombienet-upgrade-node:
name: Zombienet Upgrade Node
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
DEBUG: ${{ needs.set-variables.outputs.DEBUG }}
ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }}
COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }}
CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: upgrade node test
run: |
echo "Zombienet Upgrade Node"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
export COL_IMAGE="docker.io/paritypr/colander:4519"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/k8s" --test="0001-upgrade-node.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-upgrade
path: |
/tmp/zombie*/logs/*
zombienet-chaos-delay:
name: Zombienet Chaos Delay
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
DEBUG: ${{ needs.set-variables.outputs.DEBUG }}
ZOMBIENET_INTEGRATION_TEST_IMAGE: ${{ needs.set-variables.outputs.ZOMBIENET_INTEGRATION_TEST_IMAGE }}
COL_IMAGE: ${{ needs.set-variables.outputs.COL_IMAGE }}
CUMULUS_TEST_IMAGE: ${{ needs.set-variables.outputs.CUMULUS_TEST_IMAGE }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: chaos-delay test
run: |
echo "Zombienet Chaos Delay"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/chaos" --test="0001-delay.zndsl"
- name: upload logs
uses: actions/upload-artifact@v4
with:
name: zombienet-logs-chaos
path: |
/tmp/zombie*/logs/*
4 changes: 2 additions & 2 deletions .github/workflows/k8s-cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
uses: actions/checkout@v4

- name: Setup gcloud CLI
uses: google-github-actions/[email protected].0
uses: google-github-actions/[email protected].2
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ env.PROJECT_ID }}
export_default_credentials: true

- name: Login to GCP
uses: google-github-actions/[email protected].3
uses: google-github-actions/[email protected].7
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
node-version: '18'
- run: npm install
working-directory: "./javascript"
- run: npm dedupe
working-directory: "./javascript"
- run: npm run build
working-directory: "./javascript"
- run: npm run package:linux
Expand Down Expand Up @@ -103,3 +105,38 @@ jobs:
asset_path: ./javascript/bins/zombienet-macos-${{ matrix.target.arch }}
asset_name: zombienet-macos-${{ matrix.target.arch }}
asset_content_type: application/octet-stream
build_push_image:
name: Build and Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
environment: tags
env:
IMAGE_NAME: paritytech/zombienet
VERSION: ${{ github.ref_name }}
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0

- name: npm build
run: |
cd javascript
npm install
npm dedupe
npm run clean
npm run build
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}

- name: Build Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:latest
Loading

0 comments on commit f13b337

Please sign in to comment.