Skip to content

Commit

Permalink
Atomex Golang SDK and Market Maker role implementation (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kus authored Nov 28, 2021
1 parent 832131c commit 73b8d6a
Show file tree
Hide file tree
Showing 101 changed files with 7,473 additions and 794 deletions.
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,32 @@ jobs:
with:
version: v1.34
args: --timeout=2m
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: golang tests
env:
GO111MODULE: on
run: |
go mod download
go test ./...
- name: docker-compose test build
run: |
touch .env
docker-compose -f docker-compose.yml build
analyze:
name: Code Analyze
runs-on: ubuntu-latest
Expand All @@ -42,7 +68,7 @@ jobs:
- name: Checkout the code
uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file build/Dockerfile --tag localbuild/testimage:latest --build-arg config_file=config.test.yml
run: docker build . --file build/watch_tower/Dockerfile --tag localbuild/testimage:latest --build-arg config_file=config.test.yml
- name: Run the Anchore scan action itself with GitHub Advanced Security code scanning integration enabled
uses: anchore/scan-action@main
with:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,3 @@

# Dependency directories (remove the comment below to include it)
# vendor/

config.test.yml
13 changes: 12 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@
"program": "${workspaceFolder}/cmd/watch_tower",
"args": [
"-c",
"config.test.yml"
"../../configs"
],
"envFile": "${workspaceFolder}/.env"
}, {
"name": "Launch Market Maker",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}/cmd/market_maker",
"args": [
"-c",
"../../configs"
],
"envFile": "${workspaceFolder}/.env"
}
Expand Down
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ tower:
cd cmd/watch_tower && go run .

tower-test:
cd cmd/watch_tower && go run . -c config.test.yml
cd cmd/watch_tower && go run . -c ../../configs

market-maker:
cd cmd/market_maker && go run . -c ../../configs

test:
go test ./...
Expand All @@ -14,4 +17,7 @@ lint:
golangci-lint run

up:
docker-compose up -d --build watch_tower
docker-compose up -d --build watch_tower market_maker

down:
docker-compose down watch_tower market_maker
Loading

0 comments on commit 73b8d6a

Please sign in to comment.