-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #443 from rsksmart/QA-Test
[Qa test -> Stable-Test] - LPS v2.0.0-rc
- Loading branch information
Showing
421 changed files
with
67,421 additions
and
13,713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
if ! type commitlint >/dev/null 2>/dev/null; then | ||
echo "" | ||
echo "commitlint could not be found" | ||
echo "try again after installing commitlint or add commitlint to PATH" | ||
echo "" | ||
exit 2; | ||
fi | ||
|
||
commitlint lint --message $1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
make lint || exit 1 | ||
make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CD for flyover-api dev | ||
|
||
on: | ||
push: | ||
branches: | ||
- QA-Test | ||
|
||
jobs: | ||
execute-command: | ||
runs-on: ubuntu-latest | ||
environment: dev | ||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.DEV_ROLE_ARN }} | ||
aws-region: ${{ secrets.AWS_REGION }} | ||
|
||
- name: Execute deployment command on EC2 instance | ||
run: | | ||
aws ssm send-command \ | ||
--document-name "deployBEDevDocument" \ | ||
--instance-ids "$INSTANCE_ID" \ | ||
--document-version '$LATEST' | ||
echo "Deploy sent to EC2 instance" | ||
env: | ||
INSTANCE_ID: ${{ secrets.DEV_INSTANCE_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
run: | ||
allow-parallel-runners: true | ||
timeout: 3m | ||
tests: true | ||
skip-dirs: | ||
- internal/adapters/dataproviders/rootstock/bindings | ||
linters: | ||
presets: | ||
- bugs | ||
- complexity | ||
- unused | ||
- performance | ||
linters-settings: | ||
exhaustive: | ||
default-signifies-exhaustive: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
with-expecter: true | ||
dir: test/mocks | ||
filename: "{{ .InterfaceName | snakecase }}_mock.go" | ||
mockname: "{{ .InterfaceName | firstUpper }}Mock" | ||
outpkg: mocks | ||
packages: | ||
github.com/rsksmart/liquidity-provider-server/internal/configuration/bootstrap/wallet: | ||
interfaces: | ||
AbstractFactory: | ||
github.com/rsksmart/liquidity-provider-server/internal/adapters/alerting: | ||
interfaces: | ||
sesClient: | ||
github.com/rsksmart/liquidity-provider-server/internal/adapters/dataproviders/rootstock: | ||
interfaces: | ||
LbcBinding: | ||
RskBridgeBinding: | ||
TransactionSigner: | ||
RpcClientBinding: | ||
LbcCallerBinding: | ||
LbcAdapter: | ||
EventIteratorAdapter: | ||
RskSignerWallet: | ||
github.com/rsksmart/liquidity-provider-server/internal/adapters/dataproviders/database/mongo: | ||
interfaces: | ||
DbClientBinding: | ||
DbBinding: | ||
CollectionBinding: | ||
SessionBinding: | ||
github.com/rsksmart/liquidity-provider-server/internal/adapters/dataproviders/bitcoin/btcclient: | ||
interfaces: | ||
RpcClient: | ||
ClientAdapter: | ||
github.com/rsksmart/liquidity-provider-server/internal/usecases/liquidity_provider: | ||
interfaces: | ||
DefaultCredentialsProvider: | ||
github.com/rsksmart/liquidity-provider-server/internal/entities/liquidity_provider: | ||
interfaces: | ||
LiquidityProviderRepository: | ||
github.com/rsksmart/liquidity-provider-server/internal/entities/quote: | ||
interfaces: | ||
PeginQuoteRepository: | ||
PegoutQuoteRepository: | ||
github.com/rsksmart/liquidity-provider-server/internal/entities/blockchain: | ||
interfaces: | ||
BitcoinWallet: | ||
RootstockRpcServer: | ||
github.com/rsksmart/liquidity-provider-server/internal/adapters/dataproviders/utils: | ||
interfaces: | ||
HttpClient: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.PHONY: test | ||
|
||
COVER_FILE = coverage/cover.out | ||
TEMPORAL_COVER_FILE =$(shell pwd)/coverage/cover.out.temp | ||
|
||
filter_coverage_file = grep -v "internal/adapters/dataproviders/rootstock/bindings" $(1) > coverage/temp.txt && mv coverage/temp.txt $(1) | ||
|
||
tools: download | ||
go install github.com/parvez3019/go-swagger3@latest | ||
go install golang.org/x/vuln/cmd/govulncheck@latest | ||
go install github.com/conventionalcommit/commitlint@latest | ||
go env GOPATH | ||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.55.2 | ||
# installation with brew is because mockery team doesnt recommend to install with go install, | ||
# if you don't have brew feel free to comment this line and install mockery with other method | ||
brew install mockery && brew upgrade mockery | ||
|
||
download: | ||
go mod download | ||
|
||
lint: | ||
test -z $(shell gofmt -l .) | ||
golangci-lint run -v ./... | ||
|
||
validation: lint | ||
go mod verify | ||
govulncheck ./... # should fail on non informational vulnerabilities | ||
|
||
COMMIT_HASH ?= $(shell git rev-parse HEAD) | ||
SOURCE_VERSION := $(COMMIT_HASH) | ||
build: download | ||
mkdir -p build && cd build | ||
@echo "Building liquidity-provider-server $(SOURCE_VERSION)" | ||
CGO_ENABLED=0 go build -v -installsuffix 'static' -ldflags="-s -X 'main.BuildVersion=$(SOURCE_VERSION)' -X 'main.BuildTime=$(shell date)'" -o ./build/liquidity-provider-server ./cmd/application/main.go | ||
|
||
api: | ||
go-swagger3 --module-path . \ | ||
--main-file-path ./cmd/application/main.go \ | ||
--handler-path ./internal/adapters/entrypoints/rest/handlers \ | ||
--output OpenApi.yml \ | ||
--schema-without-pkg \ | ||
--generate-yaml true | ||
|
||
coverage: clean | ||
mkdir -p coverage | ||
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/... | ||
$(call filter_coverage_file, $(TEMPORAL_COVER_FILE)) | ||
go tool cover -func "$(TEMPORAL_COVER_FILE)" | ||
go tool cover -html="$(TEMPORAL_COVER_FILE)" | ||
rm $(TEMPORAL_COVER_FILE) | ||
|
||
coverage-report: clean | ||
mkdir -p coverage | ||
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(COVER_FILE) ./pkg/... ./internal/... ./cmd/... | ||
$(call filter_coverage_file, $(COVER_FILE)) | ||
|
||
test: clean | ||
mkdir -p coverage | ||
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/... | ||
$(call filter_coverage_file, $(TEMPORAL_COVER_FILE)) | ||
go tool cover -func $(TEMPORAL_COVER_FILE) | ||
rm $(TEMPORAL_COVER_FILE) | ||
|
||
clean: | ||
rm -rf build $(TEMPORAL_COVER_FILE) |
Oops, something went wrong.