96 lines
2.6 KiB
YAML
96 lines
2.6 KiB
YAML
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:
|
|
stack-orchestrator-ref: ${{ inputs.stack-orchestrator-ref || '7fb664270a0ba09e2caa3095e8c91f3fdb5b38af' }}
|
|
ipld-eth-beacon-db-ref: ${{ inputs.ipld-eth-beacon-db-ref || '6b38fe9b18f7b19a803c626b742cafdccc1a2365' }}
|
|
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: ubuntu-latest
|
|
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: cerc-io/stack-orchestrator
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ env.ipld-eth-beacon-db-ref }}
|
|
repository: cerc-io/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: |
|
|
sleep 20
|
|
cd ipld-eth-beacon-indexer
|
|
make system-test-ci
|
|
|
|
- name: Clean up the docker containers
|
|
if: always() && steps.compose.outcome == 'success'
|
|
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
|