2022-06-09 21:32:46 +00:00
|
|
|
name: System Testing for the stack.
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
|
|
|
stack-orchestrator-ref:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
ipld-eth-beacon-db-ref:
|
|
|
|
required: false
|
|
|
|
type: string
|
|
|
|
secrets:
|
|
|
|
GHA_KEY:
|
|
|
|
required: true
|
|
|
|
BC_ADDRESS:
|
|
|
|
required: true
|
|
|
|
env:
|
2022-06-10 13:30:52 +00:00
|
|
|
stack-orchestrator-ref: ${{ inputs.stack-orchestrator-ref || '7fb664270a0ba09e2caa3095e8c91f3fdb5b38af' }}
|
2022-06-09 21:32:46 +00:00
|
|
|
ipld-eth-beacon-db-ref: ${{ inputs.ipld-eth-beacon-db-ref || '3dfe416302d553f8240f6051c08a7899b0e39e12' }}
|
|
|
|
GOPATH: /tmp/go
|
|
|
|
bc_protocol: "http"
|
|
|
|
bc_address: ${{secrets.BC_ADDRESS}}
|
|
|
|
bc_port: 5052
|
|
|
|
db_host: localhost
|
|
|
|
db_port: 8076
|
|
|
|
db_name: vulcanize_testing
|
|
|
|
db_user: vdbm
|
|
|
|
db_password: password
|
|
|
|
db_driver: "pgx"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
system-testing:
|
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
|
|
- name: Create GOPATH
|
|
|
|
run: mkdir -p /tmp/go
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: "./ipld-eth-beacon-indexer"
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ env.stack-orchestrator-ref }}
|
|
|
|
path: "./stack-orchestrator/"
|
|
|
|
repository: vulcanize/stack-orchestrator
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
|
|
|
repository: vulcanize/ipld-eth-beacon-db
|
|
|
|
path: "./ipld-eth-beacon-db/"
|
|
|
|
ssh-key: ${{secrets.GHA_KEY}}
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Create config file
|
|
|
|
run: |
|
|
|
|
echo vulcanize_ipld_eth_beacon_db=$(pwd)/ipld-eth-beacon-db > ./config.sh
|
|
|
|
cat ./config.sh
|
|
|
|
|
|
|
|
- name: Run docker compose
|
|
|
|
id: compose
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
ls "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml"
|
|
|
|
whoami
|
|
|
|
/usr/local/bin/docker-compose \
|
|
|
|
-f "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml" \
|
|
|
|
--env-file ./config.sh \
|
|
|
|
up -d --build
|
|
|
|
|
|
|
|
- uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: ">=1.18.0"
|
|
|
|
check-latest: true
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
run: |
|
|
|
|
go install github.com/onsi/ginkgo/v2/ginkgo@latest
|
|
|
|
which ginkgo
|
|
|
|
|
|
|
|
- name: Run the tests using Make
|
|
|
|
run: |
|
2022-06-10 13:30:52 +00:00
|
|
|
sleep 20
|
2022-06-09 21:32:46 +00:00
|
|
|
cd ipld-eth-beacon-indexer
|
|
|
|
make system-test-ci
|
|
|
|
|
|
|
|
- name: Clean up the docker containers
|
2022-06-10 13:30:52 +00:00
|
|
|
if: always() && steps.compose.outcome == 'success'
|
2022-06-09 21:32:46 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
/usr/local/bin/docker-compose \
|
|
|
|
-f "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml" \
|
|
|
|
--env-file ./config.sh \
|
|
|
|
down -v
|