ipld-eth-beacon-indexer/.github/workflows/on-pr-manual.yml

79 lines
2.1 KiB
YAML
Raw Normal View History

2022-04-21 21:29:06 +00:00
name: Test Application Manually
on:
workflow_dispatch:
inputs:
foundry-test-ref:
description: "The branch, commit or sha from foundry-test to checkout"
required: false
default: "main"
ipld-eth-db-ref:
description: "The branch, commit or sha from ipld-eth-db to checkout"
required: false
default: "main"
jobs:
build:
name: Run docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker build
run: make docker-build
test:
name: Run unit tests
runs-on: ubuntu-latest
2022-04-21 23:17:45 +00:00
env:
GOPATH: /tmp/go
2022-04-21 21:29:06 +00:00
steps:
2022-04-21 23:17:45 +00:00
- name: Create GOPATH
run: mkdir -p /tmp/go
2022-04-21 21:29:06 +00:00
- uses: actions/checkout@v2
with:
2022-04-21 21:54:16 +00:00
path: "./ipld-ethcl-indexer"
2022-04-21 21:29:06 +00:00
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.foundry-test-ref }}
2022-04-21 21:54:16 +00:00
path: "./foundry-test/"
2022-04-21 21:50:42 +00:00
repository: vulcanize/foundry-test
2022-04-21 21:47:08 +00:00
fetch-depth: 0
2022-04-21 21:29:06 +00:00
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.ipld-eth-db-ref }}
2022-04-21 21:50:42 +00:00
repository: vulcanize/ipld-eth-db
2022-04-21 21:54:16 +00:00
path: "./ipld-eth-db/"
2022-04-21 21:47:08 +00:00
fetch-depth: 0
2022-04-21 21:29:06 +00:00
2022-04-21 21:39:29 +00:00
- name: Create config file
run: |
echo vulcanize_ipld_eth_db=$GITHUB_WORKSPACE/ipld-eth-db/ > ./config.sh
echo vulcanize_ipld_ethcl_indexer=$GITHUB_WORKSPACE/ipld-ethcl-indexer >> ./config.sh
cat ./config.sh
2022-04-21 21:29:06 +00:00
- name: Run docker compose
run: |
2022-04-21 21:39:29 +00:00
docker-compose \
2022-04-21 21:41:27 +00:00
-f "$GITHUB_WORKSPACE/foundry-test/docker/local/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/foundry-test/docker/latest/docker-compose-lighthouse.yml" \
--env-file ./config.sh \
up -d --build
2022-04-21 21:29:06 +00:00
2022-04-21 22:03:24 +00:00
- uses: actions/setup-go@v3
with:
go-version: ">=1.17.0"
check-latest: true
2022-04-21 22:20:56 +00:00
- name: Install packages
2022-04-21 21:29:06 +00:00
run: |
2022-04-21 22:25:15 +00:00
go install github.com/onsi/ginkgo/v2/ginkgo@latest
2022-04-21 22:20:56 +00:00
- name: Run the tests
run: |
cd ipld-ethcl-indexer
2022-04-21 23:19:25 +00:00
make test
2022-04-21 23:02:10 +00:00
# export GOPATH=$(echo $GOBIN | rev | cut -d "/" -f 2- | rev)