Archived
Compare commits
16
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3feab0592 | ||
|
|
e3e48ccbf3 | ||
|
|
df13b8f630 | ||
|
|
b7094c7e7f | ||
|
|
fefbcf031c | ||
|
|
d98b02266b | ||
|
|
beac97b842 | ||
|
|
ea7c5109b8 | ||
|
|
6ce01a79ed | ||
|
|
2d5abdce45 | ||
|
|
db1edd85e6 | ||
|
|
55b2d3bd25 | ||
|
|
a1a4837c89 | ||
|
|
18f3c2cc4f | ||
|
|
391759e929 | ||
|
|
0f7c23951d |
@@ -0,0 +1,27 @@
|
||||
name: Fixturenet-Eth-Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: 'ci-test'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: "Run an Ethereum fixturenet test"
|
||||
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: "Run fixturenet-eth tests"
|
||||
run: ./tests/fixturenet-eth/run-test.sh
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
pull_request:
|
||||
branches: '*'
|
||||
push:
|
||||
branches: '*'
|
||||
branches: 'main'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
||||
@@ -8,6 +8,6 @@ services:
|
||||
- ./ipfs/import:/import
|
||||
- ./ipfs/data:/data/ipfs
|
||||
ports:
|
||||
- "8080"
|
||||
- "4001"
|
||||
- "5001"
|
||||
- "0.0.0.0:8080:8080"
|
||||
- "0.0.0.0:4001:4001"
|
||||
- "0.0.0.0:5001:5001"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build a local version of the task executor for act-runner
|
||||
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
|
||||
docker build -t cerc/act-runner-task-executor:local -f ${CERC_REPO_BASE_DIR}/hosting/gitea/Dockerfile.task-executor ${build_command_args} ${CERC_REPO_BASE_DIR}/hosting
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
docker build -t cerc/act-runner-task-executor:local -f ${CERC_REPO_BASE_DIR}/hosting/gitea/Dockerfile.task-executor ${build_command_args} ${SCRIPT_DIR}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Originally from: https://github.com/devcontainers/images/blob/main/src/javascript-node/.devcontainer/Dockerfile
|
||||
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
|
||||
ARG VARIANT=16-bullseye
|
||||
ARG VARIANT=18-bullseye
|
||||
FROM node:${VARIANT}
|
||||
|
||||
ARG USERNAME=node
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM sigp/lighthouse:v3.2.1-modern
|
||||
FROM sigp/lighthouse:v4.0.1-modern
|
||||
|
||||
RUN apt-get update; apt-get install bash netcat curl less jq -y;
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Kubo (IPFS)
|
||||
|
||||
The Kubo stack currently uses the native IPFS docker image, therefore a single command will do:
|
||||
|
||||
```
|
||||
laconic-so --stack kubo deploy up
|
||||
```
|
||||
|
||||
If running locally, visit: http://localhost:5001/webui and explore the functionality of the WebUI.
|
||||
|
||||
If running in the cloud, visit `IP:5001/webui` and you'll likely see this error: "Could not connect to the IPFS API". To fix it:
|
||||
|
||||
1. Get the container name with `docker ps`:
|
||||
|
||||
2. Go into the container (replace with your container name):
|
||||
|
||||
```
|
||||
docker exec -it laconic-dbbf5498fd7d322930b9484121a6a5f4-ipfs-1 sh
|
||||
```
|
||||
|
||||
3. Enable CORS as described in point 2 of the error message. Copy/paste/run each line in sequence, then run `exit` to exit the container.
|
||||
|
||||
4. Restart the container:
|
||||
|
||||
```
|
||||
laconic-so --stack kubo deploy down
|
||||
laconic-so --stack kubo deploy up
|
||||
```
|
||||
|
||||
5. Refresh the `IP:5001/webui` URL in your browser, you should now be connected to IPFS.
|
||||
@@ -0,0 +1,7 @@
|
||||
version: "1.0"
|
||||
name: kubo
|
||||
description: "Run kubo (IPFS)"
|
||||
repos:
|
||||
containers:
|
||||
pods:
|
||||
- kubo
|
||||
@@ -175,4 +175,8 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches_file):
|
||||
git_repo.git.checkout(branch_to_checkout)
|
||||
|
||||
for repo in repos:
|
||||
process_repo(repo)
|
||||
try:
|
||||
process_repo(repo)
|
||||
except git.exc.GitCommandError as error:
|
||||
print(f"\n******* git command returned error exit status:\n{error}")
|
||||
sys.exit(1)
|
||||
|
||||
@@ -7,5 +7,6 @@ if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then
|
||||
fi
|
||||
python3 -m venv venv
|
||||
source ./venv/bin/activate
|
||||
pip install --editable .
|
||||
python3 -m pip install --upgrade pip setuptools wheel
|
||||
pip install shiv
|
||||
pip install --editable .
|
||||
|
||||
Executable
+39
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
echo "Running stack-orchestrator Ethereum fixturenet test"
|
||||
# Bit of a hack, test the most recent package
|
||||
TEST_TARGET_SO=$( ls -t1 ./package/laconic-so* | head -1 )
|
||||
# Set a new unique repo dir
|
||||
export CERC_REPO_BASE_DIR=$(mktemp -d stack-orchestrator-fixturenet-eth-test.XXXXXXXXXX)
|
||||
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"
|
||||
$TEST_TARGET_SO --stack fixturenet-eth setup-repositories
|
||||
$TEST_TARGET_SO --stack fixturenet-eth build-containers
|
||||
$TEST_TARGET_SO --stack fixturenet-eth deploy up
|
||||
# Verify that the fixturenet is up and running
|
||||
$TEST_TARGET_SO --stack fixturenet-eth deploy ps
|
||||
$TEST_TARGET_SO --stack fixturenet-eth deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
|
||||
initial_block_number=$($TEST_TARGET_SO --stack fixturenet-eth deploy exec foundry "cast block-number")
|
||||
# Check that the block number increases some time later
|
||||
sleep 12
|
||||
subsequent_block_number=$($TEST_TARGET_SO --stack fixturenet-eth deploy exec foundry "cast block-number")
|
||||
block_number_difference=$((subsequent_block_number - initial_block_number))
|
||||
# Block height difference should be between 1 and some small number
|
||||
if [[ $block_number_difference -gt 1 && $block_number_difference -lt 10 ]]; then
|
||||
echo "Test passed"
|
||||
test_result=0
|
||||
else
|
||||
echo "Test failed: block numbers were ${initial_block_number} and ${subsequent_block_number}"
|
||||
test_result=1
|
||||
fi
|
||||
$TEST_TARGET_SO --stack fixturenet-eth deploy down
|
||||
echo "Removing cloned repositories"
|
||||
rm -rf $CERC_REPO_BASE_DIR
|
||||
exit $test_result
|
||||
Reference in New Issue
Block a user