Utilize Ginkgo and replace testing
library.
#9
55
.github/workflows/on-pr-automated.yaml
vendored
55
.github/workflows/on-pr-automated.yaml
vendored
@ -1,6 +1,8 @@
|
|||||||
name: Test Application
|
name: Test Application
|
||||||
|
|
||||||
on: [pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Run docker build
|
name: Run docker build
|
||||||
@ -11,13 +13,58 @@ jobs:
|
|||||||
run: make docker-build
|
run: make docker-build
|
||||||
test:
|
test:
|
||||||
name: Run unit tests
|
name: Run unit tests
|
||||||
env:
|
|
||||||
GOPATH: /tmp/go
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
foundry-test-ref: feature/build-stack
|
||||||
|
ipld-eth-db-ref: main
|
||||||
|
GOPATH: /tmp/go
|
||||||
steps:
|
steps:
|
||||||
|
- name: Create GOPATH
|
||||||
|
run: mkdir -p /tmp/go
|
||||||
|
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: "./ipld-ethcl-indexer"
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.inputs.tags }}
|
ref: ${{ env.foundry-test-ref }}
|
||||||
path: "./foundry-test/"
|
path: "./foundry-test/"
|
||||||
|
repository: vulcanize/foundry-test
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ env.ipld-eth-db-ref }}
|
||||||
|
repository: vulcanize/ipld-eth-db
|
||||||
|
path: "./ipld-eth-db/"
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- name: Run docker compose
|
||||||
|
run: |
|
||||||
|
docker-compose \
|
||||||
|
-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
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: ">=1.17.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 test
|
||||||
|
7
.github/workflows/on-pr-manual.yml
vendored
7
.github/workflows/on-pr-manual.yml
vendored
@ -71,13 +71,6 @@ jobs:
|
|||||||
go install github.com/onsi/ginkgo/v2/ginkgo@latest
|
go install github.com/onsi/ginkgo/v2/ginkgo@latest
|
||||||
which ginkgo
|
which ginkgo
|
||||||
|
|
||||||
- name: Run the tests
|
|
||||||
run: |
|
|
||||||
cd ipld-ethcl-indexer
|
|
||||||
go vet ./...
|
|
||||||
go fmt ./...
|
|
||||||
$(which ginkgo) -r
|
|
||||||
|
|
||||||
- name: Run the tests using Make
|
- name: Run the tests using Make
|
||||||
run: |
|
run: |
|
||||||
cd ipld-ethcl-indexer
|
cd ipld-ethcl-indexer
|
||||||
|
Loading…
Reference in New Issue
Block a user