Compare commits
4 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a61146bf7f | |
|
|
94cb9fa591 | |
|
|
7f149e6045 | |
|
|
d493154d6a |
|
|
@ -0,0 +1,39 @@
|
|||
name: Fixturenet Pocket Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: '*'
|
||||
push:
|
||||
branches:
|
||||
- ci-test
|
||||
- test-pokt
|
||||
|
||||
# Needed until we can incorporate docker startup into the executor container
|
||||
env:
|
||||
DOCKER_HOST: unix:///var/run/dind.sock
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run basic test suite"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Clone project repository"
|
||||
uses: actions/checkout@v3
|
||||
- name: "Install Python"
|
||||
uses: cerc-io/setup-python@v4
|
||||
with:
|
||||
python-version: '3.8'
|
||||
- name: "Print Python version"
|
||||
run: python3 --version
|
||||
- name: "Install shiv"
|
||||
run: pip install shiv
|
||||
- name: "Generate build version file"
|
||||
run: ./scripts/create_build_tag_file.sh
|
||||
- name: "Build local shiv package"
|
||||
run: ./scripts/build_shiv_package.sh
|
||||
- name: Start dockerd # Also needed until we can incorporate into the executor
|
||||
run: |
|
||||
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
||||
sleep 5
|
||||
- name: "Run test"
|
||||
run: ./tests/fixturenet-pocket/run-pocket-test.sh
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
# Set the stack
|
||||
STACK=fixturenet-pocket
|
||||
# Dump environment variables for debugging
|
||||
echo "Environment variables:"
|
||||
env
|
||||
# Basic simple test of stack-orchestrator functionality
|
||||
echo "Running stack-orchestrator smoke test"
|
||||
# Bit of a hack, test the most recent package
|
||||
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
|
||||
# Set a non-default repo dir
|
||||
export CERC_REPO_BASE_DIR=~/stack-orchestrator-test/repo-base-dir
|
||||
echo "Testing this package: $TEST_TARGET_SO"
|
||||
echo "Test version command"
|
||||
reported_version_string=$( $TEST_TARGET_SO version )
|
||||
echo "Version reported is: ${reported_version_string}"
|
||||
echo "Cloning repositories into: $CERC_REPO_BASE_DIR"
|
||||
rm -rf $CERC_REPO_BASE_DIR
|
||||
mkdir -p $CERC_REPO_BASE_DIR
|
||||
# Pull the stack
|
||||
$TEST_TARGET_SO --stack $STACK setup-repositories
|
||||
# Build the stack
|
||||
$TEST_TARGET_SO --stack $STACK build-containers
|
||||
echo "Images in the local registry:"
|
||||
docker image ls -a
|
||||
# Deploy the test container
|
||||
$TEST_TARGET_SO --stack $STACK deploy up
|
||||
# Run some status checks (TODO verify the responses)
|
||||
$TEST_TARGET_SO --stack fixturenet-pocket deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
||||
$TEST_TARGET_SO --stack fixturenet-pocket deploy exec pocket "pocket query height"
|
||||
$TEST_TARGET_SO --stack fixturenet-pocket deploy logs pocket
|
||||
# Send a relay request
|
||||
curl -X POST --data '{"relay_network_id":"0021","payload":{"data":"{\"jsonrpc\": \"2.0\",\"id\": 1,\"method\": \"eth_blockNumber\",\"params\": []}","method":"POST","path":"","headers":{}}}' http://localhost:8081/v1/client/sim
|
||||
# Clean up
|
||||
$TEST_TARGET_SO --stack $STACK deploy down
|
||||
echo "Test passed"
|
||||
Loading…
Reference in New Issue