Skip to content

Commit

Permalink
updated CI for tests (#1075)
Browse files Browse the repository at this point in the history
* updated CI for tests

* removed docker from test ci
  • Loading branch information
Shrikant1212 committed Apr 14, 2023
1 parent b6309bb commit 0f15f3b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
31 changes: 24 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,46 @@ jobs:
version: 20.10.7
docker_layer_caching: true
- run:
name: "Building docker image"
name: "Installing node and go"
command: |
docker build --file Dockerfile.test -t razor-test .
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install npm ethereum
- run:
name: "Installing dependencies"
command: |
npm i
go get -d github.com/ethereum/go-ethereum@v1.10.8 \
&& go install github.com/ethereum/go-ethereum/cmd/abigen@v1.10.8 \
&& go install github.com/mattn/goveralls@v0.0.11 \
&& go install github.com/ory/go-acc@v0.2.7 \
&& go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.2
- run:
name: "Make Setup"
command: |
make setup
- run:
name: "go-fmt"
command: |
docker run --rm -v $(pwd):/test --name go razor-test gofmt
gofmt
- run:
name: "go-lint"
command: |
docker run --rm -v $(pwd):/test --name go razor-test golangci-lint run -v --timeout 5m
golangci-lint run -v --timeout 5m
- run:
name: "Executing test cases"
command: |
docker run --rm -v $(pwd):/test --name go razor-test go-acc ./... --ignore razor/accounts/mocks --ignore razor/cmd/mocks --ignore razor/utils/mocks --ignore pkg --ignore razor/path/mocks --output /test/coverage.txt
go-acc ./... --ignore razor/accounts/mocks --ignore razor/cmd/mocks --ignore razor/utils/mocks --ignore pkg --ignore razor/path/mocks --output coverage.txt
- run:
name: "Executing benchmarks"
command: |
docker run --rm -v $(pwd):/test --name go razor-test go test ./... -bench=. -run=^#
go test ./... -bench=. -run=^#
- run:
name: "Publish Coverage to Coveralls.io"
command: |
docker run --rm -v $(pwd):/test --name go -e COVERALLS_TOKEN=$COVERALLS_TOKEN razor-test goveralls -coverprofile=/test/coverage.txt -service semaphore -repotoken $COVERALLS_TOKEN
goveralls -coverprofile=coverage.txt -service semaphore -repotoken $COVERALLS_TOKEN
- persist_to_workspace:
root: .
paths:
Expand Down
17 changes: 0 additions & 17 deletions Dockerfile.test

This file was deleted.

0 comments on commit 0f15f3b

Please sign in to comment.