ipld-eth-beacon-indexer/.github/workflows/system-tests.yml

94 lines
2.6 KiB
YAML
Raw Normal View History

2022-06-09 15:56:24 +00:00
name: System Testing for the stack.
on:
workflow_call:
inputs:
stack-orchestrator-ref:
required: false
type: string
2022-06-09 20:12:08 +00:00
ipld-eth-beacon-db-ref:
2022-06-09 15:56:24 +00:00
required: false
type: string
secrets:
GHA_KEY:
required: true
2022-06-09 16:08:18 +00:00
BC_ADDRESS:
required: true
2022-06-09 15:56:24 +00:00
env:
2022-06-09 20:12:08 +00:00
stack-orchestrator-ref: ${{ inputs.stack-orchestrator-ref || '3048a224100ceb122d6da71328bf3803dff72a01' }}
ipld-eth-beacon-db-ref: ${{ inputs.ipld-eth-beacon-db-ref || '3dfe416302d553f8240f6051c08a7899b0e39e12' }}
2022-06-09 15:56:24 +00:00
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"
2022-06-09 18:53:35 +00:00
#DOCKER_HOST: 127.0.0.1:2375
2022-06-09 15:56:24 +00:00
jobs:
system-testing:
runs-on: self-hosted
steps:
- name: Create GOPATH
run: mkdir -p /tmp/go
- uses: actions/checkout@v2
with:
2022-06-09 20:12:08 +00:00
path: "./ipld-eth-beacon-indexer"
2022-06-09 15:56:24 +00:00
- 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:
2022-06-09 20:12:08 +00:00
ref: ${{ env.ipld-eth-beacon-db-ref }}
repository: vulcanize/ipld-eth-beacon-db
path: "./ipld-eth-beacon-db/"
2022-06-09 15:56:24 +00:00
ssh-key: ${{secrets.GHA_KEY}}
fetch-depth: 0
- name: Create config file
run: |
2022-06-09 20:12:08 +00:00
echo vulcanize_ipld_eth_beacon_db=$(pwd)/ipld-eth-beacon-db > ./config.sh
2022-06-09 15:56:24 +00:00
cat ./config.sh
- name: Run docker compose
id: compose
run: |
2022-06-09 20:12:08 +00:00
ls "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml"
whoami
/bin/bash docker-compose \
2022-06-09 20:12:08 +00:00
-f "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml" \
2022-06-09 15:56:24 +00:00
--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-09 20:12:08 +00:00
cd ipld-eth-beacon-indexer
2022-06-09 15:56:24 +00:00
make system-test-ci
- name: Clean up the docker containers
if: steps.compose.outcome == 'success'
run: |
/bin/bash docker-compose \
2022-06-09 20:12:08 +00:00
-f "./stack-orchestrator/docker/local/docker-compose-ipld-eth-beacon-db.yml" \
2022-06-09 15:56:24 +00:00
--env-file ./config.sh \
2022-06-09 16:27:17 +00:00
down -v