Skip to content

Commit

Permalink
Merge pull request #6 from vulcanize/ng-update-geth-v3
Browse files Browse the repository at this point in the history
Merge changes to update geth
  • Loading branch information
ashwinphatak authored Jun 8, 2022
2 parents f44508f + 90488d8 commit d2b66af
Show file tree
Hide file tree
Showing 6 changed files with 389 additions and 335 deletions.
45 changes: 25 additions & 20 deletions .github/workflows/on-pr.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: Docker Build
env:
STACK_ORCHESTRATOR_REF: e10025903ee8f2e7379cb89724f8f5b9f4dccc7b

on: [pull_request]
jobs:
Expand All @@ -14,49 +16,52 @@ jobs:
name: Run unit tests
env:
GOPATH: /tmp/go
strategy:
matrix:
go-version: [1.16.x]
runs-on: ubuntu-latest
steps:
- name: Create GOPATH
run: mkdir -p /tmp/go
- name: Install Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
go-version: ">=1.18.0"
check-latest: true
- uses: actions/checkout@v2
- name: Run database
run: docker-compose up -d ipld-eth-db
with:
path: "./eth-statediff-fill-service"
- uses: actions/checkout@v2
with:
ref: ${{ env.STACK_ORCHESTRATOR_REF }}
path: "./stack-orchestrator/"
repository: vulcanize/stack-orchestrator
- name: Run docker compose
run: |
docker-compose \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
up -d --build
- name: Test
run: |
sleep 10
cd $GITHUB_WORKSPACE/eth-statediff-fill-service
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 DATABASE_NAME=vulcanize_testing make test
integrationtest:
name: Run integration tests
env:
STACK_ORCHESTRATOR_REF: e154fa18452079e1a537e01b79056846a9620db3
GO_ETHEREUM_REF: 17d272d837e49eecfdfe970a02b2bb64f77cdced
IPLD_ETH_SERVER_REF: c25d220f716914802c11d5fd7c12ca37a3ce548d
GO_ETHEREUM_REF: "v1.10.18-statediff-3.2.2"
IPLD_ETH_SERVER_REF: "v3.2.1"
GOPATH: /tmp/go
DB_WRITE: true
ETH_FORWARD_ETH_CALLS: false
ETH_PROXY_ON_ERROR: false
ETH_HTTP_PATH: "go-ethereum:8545"
WATCHED_ADDRESS_GAP_FILLER_INTERVAL: 5
strategy:
matrix:
go-version: [1.16.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Create GOPATH
run: mkdir -p /tmp/go
- name: Install Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
go-version: ">=1.18.0"
check-latest: true
- uses: actions/checkout@v2
with:
path: "./eth-statediff-fill-service"
Expand Down Expand Up @@ -96,10 +101,10 @@ jobs:
- name: Run docker compose
run: |
docker-compose \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-eth-statediff-fill-service.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-alpine as builder
FROM golang:1.18-alpine as builder

RUN apk --update --no-cache add make git g++ linux-headers
# DEBUG
Expand Down
14 changes: 5 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
BIN = $(GOPATH)/bin

# Tools
## Testing library
GINKGO = $(BIN)/ginkgo
$(BIN)/ginkgo:
go get -u github.com/onsi/ginkgo/ginkgo

## Migration tool
GOOSE = $(BIN)/goose
$(BIN)/goose:
go get -u github.com/pressly/goose/cmd/goose

.PHONY: installtools
installtools: | $(LINT) $(GOOSE) $(GINKGO)
installtools: | $(LINT) $(GOOSE)
echo "Installing tools"

.PHONY: test
test: | $(GINKGO) $(GOOSE)
test: | $(GOOSE)
go vet ./...
go fmt ./...
$(GINKGO) -r --skipPackage=test
go run github.com/onsi/ginkgo/ginkgo -r --skipPackage=test

.PHONY: integrationtest
integrationtest: | $(GINKGO) $(GOOSE)
integrationtest: | $(GOOSE)
go vet ./...
go fmt ./...
$(GINKGO) -r test/ -v
go run github.com/onsi/ginkgo/ginkgo -r test/ -v

build:
go fmt ./...
Expand Down
Loading

0 comments on commit d2b66af

Please sign in to comment.