install SO via curl

install py

setup go v4
This commit is contained in:
Roy Crihfield 2023-09-15 16:30:43 +08:00
parent 5ab353605c
commit 47ebfa205c
2 changed files with 29 additions and 24 deletions

View File

@ -11,34 +11,35 @@ on:
# Needed until we can incorporate docker startup into the executor container # Needed until we can incorporate docker startup into the executor container
env: env:
DOCKER_HOST: unix:///var/run/dind.sock DOCKER_HOST: unix:///var/run/dind.sock
SO_VERSION: v1.1.0-c30c779-202309082138
jobs: jobs:
unit-tests: unit-tests:
name: "Run unit tests" name: Run unit tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/setup-go@v3 - uses: actions/setup-go@v4
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
check-latest: true check-latest: true
- name: "Run dockerd" - name: Run dockerd
run: | run: |
dockerd -H $DOCKER_HOST --userland-proxy=false & dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5 sleep 5
- name: "Run DB container" - name: Run DB container
run: | run: |
docker compose -f test/compose.yml up --wait docker compose -f test/compose.yml up --wait
- name: "Set up Gitea access token" - name: Set up Gitea access token
env: env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }} TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: | run: |
git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf https://git.vdb.to/ git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf https://git.vdb.to/
- name: "Run tests" - name: Run tests
run: go test -v ./... run: go test -v ./...
integration-tests: integration-tests:
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@v3
@ -50,10 +51,10 @@ jobs:
repository: cerc-io/plugeth repository: cerc-io/plugeth
ref: statediff ref: statediff
path: ./plugeth path: ./plugeth
- name: "Run dockerd" - name: Run dockerd
run: dockerd -H $DOCKER_HOST --userland-proxy=false & run: dockerd -H $DOCKER_HOST --userland-proxy=false &
# These images need access tokens configured # These images need access tokens configured
- name: "Build docker image" - name: Build docker image
env: env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }} TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: | run: |
@ -63,26 +64,27 @@ jobs:
docker build ./plugeth -t cerc/plugeth:local \ docker build ./plugeth -t cerc/plugeth:local \
--build-arg GIT_VDBTO_TOKEN="$TOKEN" --build-arg GIT_VDBTO_TOKEN="$TOKEN"
- name: "Install stack-orchestrator" - name: Install stack-orchestrator
uses: actions/checkout@v3 run: |
with: curl -L -O https://github.com/cerc-io/stack-orchestrator/releases/download/$SO_VERSION/laconic-so
repository: cerc-io/stack-orchestrator chmod +x laconic-so
ref: v1.1.0-e856616-202308032031 - name: Clone system-tests
path: ./stack-orchestrator
- run: |
apt-get update && apt-get install -y python3-pip
pip install ./stack-orchestrator
- name: "Clone system-tests"
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
repository: cerc-io/system-tests repository: cerc-io/system-tests
ref: plugeth-compat ref: plugeth-compat
path: ./system-tests path: ./system-tests
token: ${{ secrets.CICD_REPO_TOKEN }} token: ${{ secrets.CICD_REPO_TOKEN }}
- name: "Run testnet stack" - name: Run testnet stack
working-directory: ./plugeth-statediff working-directory: ./plugeth-statediff
env:
LACONIC_SO: ../laconic-so
run: ./scripts/integration-setup.sh run: ./scripts/integration-setup.sh
- name: "Run tests" - name: Install Python
env:
DEBIAN_FRONTEND: noninteractive
run: apt-get update && apt-get install -y python3-pip
- name: Run tests
working-directory: ./system-tests working-directory: ./system-tests
run: | run: |
pip install pytest pip install pytest

View File

@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
# Build and deploy a stack with only the parts we need # Builds and deploys a stack with only what we need.
# This script assumes we are running in the project root.
set -ex set -e
cluster="${1:-test}" cluster="${1:-test}"
laconic_so="${LACONIC_SO:-laconic-so} --stack fixturenet-plugeth-tx --verbose" laconic_so="${LACONIC_SO:-laconic-so} --stack fixturenet-plugeth-tx --verbose"
@ -9,11 +10,13 @@ laconic_so="${LACONIC_SO:-laconic-so} --stack fixturenet-plugeth-tx --verbose"
CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}") CONFIG_DIR=$(readlink -f "${CONFIG_DIR:-$(mktemp -d)}")
# Point stack-orchestrator to the multi-project root # Point stack-orchestrator to the multi-project root
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(realpath $(git rev-parse --show-toplevel)/..)}" export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-$(git rev-parse --show-toplevel)/..}"
# v5 migrations only go up to version 18 # v5 migrations only go up to version 18
echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=18 >> $CONFIG_DIR/stack.env echo CERC_STATEDIFF_DB_GOOSE_MIN_VER=18 >> $CONFIG_DIR/stack.env
set -x
if [[ -z $SKIP_BUILD ]]; then if [[ -z $SKIP_BUILD ]]; then
$laconic_so setup-repositories \ $laconic_so setup-repositories \
--exclude github.com/dboreham/foundry,github.com/cerc-io/tx-spammer,github.com/cerc-io/ipld-eth-server,git.vdb.to/cerc-io/plugeth,git.vdb.to/cerc-io/plugeth-statediff \ --exclude github.com/dboreham/foundry,github.com/cerc-io/tx-spammer,github.com/cerc-io/ipld-eth-server,git.vdb.to/cerc-io/plugeth,git.vdb.to/cerc-io/plugeth-statediff \