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
|
|
|
|
ipld-ethcl-db-ref:
|
|
|
|
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:
|
|
|
|
stack-orchestrator-ref: ${{ inputs.stack-orchestrator-ref || '2e0d4f4f3cba4dc526df96818351a109dc295efa' }}
|
|
|
|
ipld-ethcl-db-ref: ${{ inputs.ipld-ethcl-db-ref || 'feature/historic-processing' }}
|
|
|
|
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:
|
|
|
|
path: "./ipld-ethcl-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-ethcl-db-ref }}
|
|
|
|
repository: vulcanize/ipld-ethcl-db
|
|
|
|
path: "./ipld-ethcl-db/"
|
|
|
|
ssh-key: ${{secrets.GHA_KEY}}
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Create config file
|
|
|
|
run: |
|
2022-06-09 16:19:26 +00:00
|
|
|
echo vulcanize_ipld_ethcl_db=$(pwd)/ipld-ethcl-db > ./config.sh
|
2022-06-09 15:56:24 +00:00
|
|
|
cat ./config.sh
|
|
|
|
|
|
|
|
- name: Run docker compose
|
|
|
|
id: compose
|
|
|
|
run: |
|
2022-06-09 18:53:35 +00:00
|
|
|
ls "./stack-orchestrator/docker/local/docker-compose-ethcl-db.yml"
|
|
|
|
sudo docker-compose \
|
2022-06-09 16:14:32 +00:00
|
|
|
-f "./stack-orchestrator/docker/local/docker-compose-ethcl-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: |
|
|
|
|
cd ipld-ethcl-indexer
|
|
|
|
make system-test-ci
|
|
|
|
|
|
|
|
- name: Clean up the docker containers
|
|
|
|
if: steps.compose.outcome == 'success'
|
|
|
|
run: |
|
2022-06-09 18:53:35 +00:00
|
|
|
sudo docker-compose \
|
2022-06-09 16:14:32 +00:00
|
|
|
-f "./stack-orchestrator/docker/local/docker-compose-ethcl-db.yml" \
|
2022-06-09 15:56:24 +00:00
|
|
|
--env-file ./config.sh \
|
2022-06-09 16:27:17 +00:00
|
|
|
down -v
|