refactor script, clone stack separately
This commit is contained in:
parent
3d9a39bb1a
commit
26e720a28a
@ -10,6 +10,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
SO_VERSION: v1.1.0-87fffca-202404110321
|
SO_VERSION: v1.1.0-87fffca-202404110321
|
||||||
|
FIXTURENET_ETH_STACKS_VERSION: plugeth-stack
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
unit-tests:
|
unit-tests:
|
||||||
@ -31,34 +32,42 @@ jobs:
|
|||||||
name: Run integration tests
|
name: Run integration tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: ./plugeth-statediff
|
path: ./plugeth-statediff
|
||||||
|
progress: false
|
||||||
- name: Build docker image
|
- name: Build docker image
|
||||||
run: |
|
run: |
|
||||||
docker build ./plugeth-statediff -t cerc/plugeth-statediff:local
|
docker build ./plugeth-statediff -t cerc/plugeth-statediff:local
|
||||||
|
|
||||||
|
- name: Install Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: 3.11
|
||||||
- name: Install stack-orchestrator
|
- name: Install stack-orchestrator
|
||||||
run: |
|
run: |
|
||||||
curl -L -O https://github.com/cerc-io/stack-orchestrator/releases/download/$SO_VERSION/laconic-so
|
curl -L -O https://github.com/cerc-io/stack-orchestrator/releases/download/$SO_VERSION/laconic-so
|
||||||
chmod +x laconic-so
|
chmod +x laconic-so
|
||||||
|
echo PATH="$PATH:$(pwd)" >> $GITHUB_ENV
|
||||||
- name: Clone system-tests
|
- name: Clone system-tests
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: cerc-io/system-tests
|
repository: cerc-io/system-tests
|
||||||
ref: v0.1.0-20240411
|
ref: v0.1.0-20240411
|
||||||
path: ./system-tests
|
path: ./system-tests
|
||||||
token: ${{ secrets.CICD_REPO_TOKEN }}
|
token: ${{ secrets.CICD_REPO_TOKEN }}
|
||||||
|
progress: false
|
||||||
|
- name: Clone fixturenet stack repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: cerc-io/fixturenet-eth-stacks
|
||||||
|
ref: ${{ env.FIXTURENET_ETH_STACKS_VERSION }}
|
||||||
|
path: ./fixturenet-eth-stacks
|
||||||
|
progress: false
|
||||||
- name: Run testnet stack
|
- name: Run testnet stack
|
||||||
working-directory: ./plugeth-statediff
|
working-directory: ./plugeth-statediff
|
||||||
env:
|
run: |
|
||||||
LACONIC_SO: ../laconic-so
|
./scripts/run-test-stack.sh ../fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-plugeth
|
||||||
run: ./scripts/integration-setup.sh
|
|
||||||
- name: Install Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.11
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: ./system-tests
|
working-directory: ./system-tests
|
||||||
run: |
|
run: |
|
||||||
|
@ -1,26 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Builds and deploys a stack with only what we need.
|
|
||||||
# This script assumes we are running in the project root.
|
|
||||||
|
|
||||||
set -e
|
set -ex
|
||||||
|
|
||||||
STACK_URL="git.vdb.to/cerc-io/fixturenet-eth-stacks"
|
[[ -d "$1" ]]
|
||||||
|
|
||||||
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
|
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
|
||||||
|
# By default assume we are running in the project root.
|
||||||
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
|
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
|
||||||
|
|
||||||
laconic-so --verbose fetch-stack "$STACK_URL"
|
|
||||||
stack_dir=$CERC_REPO_BASE_DIR/fixturenet-eth-stacks/stack-orchestrator/stacks/fixturenet-plugeth
|
|
||||||
git -C $stack_dir checkout origin/plugeth-stack
|
|
||||||
|
|
||||||
# Note: stack path should be absolute, otherwise SO looks for it in packaged stacks
|
# Note: stack path should be absolute, otherwise SO looks for it in packaged stacks
|
||||||
laconic_so="laconic-so --stack $stack_dir --verbose"
|
stack_dir=$(readlink -f "$1")
|
||||||
|
|
||||||
echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=21 >> $CONFIG_DIR/stack.env
|
laconic_so="laconic-so --verbose --stack $stack_dir"
|
||||||
# don't run plugeth in the debugger
|
|
||||||
|
# Don't run geth/plugeth in the debugger, it will swallow error backtraces
|
||||||
echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env
|
echo CERC_REMOTE_DEBUG=false >> $CONFIG_DIR/stack.env
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
if [[ -z $SKIP_BUILD ]]; then
|
if [[ -z $SKIP_BUILD ]]; then
|
||||||
$laconic_so setup-repositories \
|
$laconic_so setup-repositories \
|
Loading…
Reference in New Issue
Block a user