Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3788 commits
Select commit Hold shift + click to select a range
4f9ac6f
pivotshort: move notification message to make log clean
c9s Jun 9, 2022
2e3badc
strategy: remove redundant code
andycheng123 Jun 9, 2022
aa2ba26
pivotshort: refactor and add more fix
c9s Jun 9, 2022
a813456
pivotshort: add stopEMA
c9s Jun 9, 2022
9396ab9
update pivotshort optimizer config
c9s Jun 9, 2022
b79e4f2
fixedpoint: add marshalYAML interface support
c9s Jun 9, 2022
260857b
pivotshort: add TradeStats
c9s Jun 9, 2022
e575236
pivotshort: adjust shadow ratio calculation
c9s Jun 9, 2022
53913ed
update pivotshort config
c9s Jun 9, 2022
6e3c060
Merge pull request #698 from c9s/strategy/pivot
c9s Jun 9, 2022
449186f
Merge pull request #697 from andycheng123/fix/supertrend
c9s Jun 9, 2022
35a5826
pivotshort: add roiMinTakeProfitPercentage option and cumulatedVolume…
c9s Jun 9, 2022
56f60bf
fix roiTakeProfitPercentage comment
c9s Jun 9, 2022
669b627
add config/pivotshort_optimizer.yaml option
c9s Jun 9, 2022
aeae2d5
Merge pull request #699 from c9s/strategy/pivot
c9s Jun 9, 2022
470e003
max: fix max v3 order cancel
c9s Jun 9, 2022
9ffefba
adjust CancelOrderWaitTime back to 20ms
c9s Jun 9, 2022
ef454f6
update command doc files
c9s Jun 9, 2022
0921f03
bump version to v1.33.3
c9s Jun 9, 2022
2d8764e
add v1.33.3 release note
c9s Jun 9, 2022
a9d2a9e
pivotshort: add breakLow.bounceRatio option
c9s Jun 10, 2022
a4e3fd5
Merge pull request #700 from c9s/strategy/pivot
c9s Jun 10, 2022
1dbd5db
sync: only sync when previous operation is done
ycdesu Jun 10, 2022
9a71c9a
web: pass root ctx into setup func
ycdesu Jun 10, 2022
f1e24bf
feature: add codecoverage and add race detection in go test, fix: fix…
zenixls2 Jun 10, 2022
71aae0c
fix: fix typo in codecov name
zenixls2 Jun 10, 2022
1e67acd
fix: set buffer period to allow buffer to get fully appended before t…
zenixls2 Jun 10, 2022
e60e217
Merge pull request #704 from zenixls2/feature/code-coverage
zenixls2 Jun 10, 2022
97d6802
add codecoverage badge
zenixls2 Jun 10, 2022
fba0a20
fix pivot indicator: filter out zero lows and highs
c9s Jun 10, 2022
91b9605
pivotshort: manually update pivot indicator
c9s Jun 10, 2022
46450c0
pivotshort: rename pivotLength to window and update indicator manually
c9s Jun 10, 2022
5a81066
Merge pull request #705 from c9s/feature/add-codecov-badge
c9s Jun 10, 2022
2bab210
Merge pull request #703 from c9s/fix/sync-goroutine-leak
c9s Jun 10, 2022
c1b1dac
cleanup: remove unused import
ycdesu Jun 10, 2022
c1638b4
refactor: remove redundant fragment
ycdesu Jun 10, 2022
cbec428
tool: setup prettier
ycdesu Jun 10, 2022
ec68dc2
reimplement placeBounceSellOrders
c9s Jun 10, 2022
fd60e9e
Merge pull request #706 from c9s/feature/add-pretteir
c9s Jun 10, 2022
4e9a915
format js codes
ycdesu Jun 11, 2022
c9e4517
Merge pull request #708 from c9s/refactor/format-js
ycdesu Jun 11, 2022
3d0c071
pivotshort: fix bounce short
c9s Jun 11, 2022
5949c75
make bounce short optional
c9s Jun 11, 2022
ce70bbb
account: check if balance exists
c9s Jun 11, 2022
2e8f9c3
backtest: fix fee calculation
c9s Jun 11, 2022
69fc6ca
backtest: add fee token support
c9s Jun 11, 2022
77e8af2
Merge pull request #710 from c9s/strategy/pivot
c9s Jun 12, 2022
c9de686
mui: upgrade from v4 to v5
ycdesu Jun 12, 2022
9af23c4
mui: fix import path
ycdesu Jun 12, 2022
8d7fba0
mui: fix data-grid path
ycdesu Jun 12, 2022
1a8b3bb
mui: modify @mui/core to @mui/material
ycdesu Jun 12, 2022
d9f9fc1
mui: modify @mui/icons to @mui/icons-material
ycdesu Jun 12, 2022
b81b148
mui: fix makeStyles path
ycdesu Jun 12, 2022
f427580
mui: remove v4
ycdesu Jun 12, 2022
a65374d
fix: fixedpoint percentage bound check
zenixls2 Jun 13, 2022
8cf57ca
Merge pull request #712 from zenixls2/fix/fixedpoint_percentage
c9s Jun 13, 2022
28666d4
fix profit pointer check
c9s Jun 13, 2022
e8d2553
fix filterSimpleArgs for notification format
c9s Jun 13, 2022
35d04bd
remove kline debug log
c9s Jun 13, 2022
0164cd1
fix reflect.Elem call
c9s Jun 13, 2022
eba6706
move FilterSimpleArgs to the util package
c9s Jun 13, 2022
e3a894e
fix telegram filterPlaintextMessages
c9s Jun 13, 2022
f8dfb99
update command doc files
c9s Jun 13, 2022
8d2967c
bump version to v1.33.4
c9s Jun 13, 2022
99a91f1
add v1.33.4 release note
c9s Jun 13, 2022
4a6fb63
check nil
c9s Jun 13, 2022
a506a00
xmaker: fix position notify
c9s Jun 13, 2022
70d6d8f
optimizer: share klines in report
andycheng123 Jun 13, 2022
8f18b41
optimizer: move klines to shared/
andycheng123 Jun 13, 2022
869115c
Merge pull request #711 from c9s/yc/upgrade-material-ui
ycdesu Jun 13, 2022
8d9e636
binance: add GetApiReferralIfNewUserRequest api
c9s Jun 14, 2022
7ffe010
optimizer: kline directory by backtest period
andycheng123 Jun 14, 2022
b1873aa
support specifying session in sync symbol
c9s Jun 14, 2022
f4c3573
update sync config example
c9s Jun 14, 2022
ae41a45
ci: use sed to remove generated files
c9s Jun 14, 2022
e7fc12a
update symbols doc
c9s Jun 14, 2022
b5b1719
feature: filter signal by ewo histogram and 3*atr entry
zenixls2 May 31, 2022
0ff3d94
refactor: ewo choose ma
zenixls2 Jun 6, 2022
28d0148
clean: clean code, add comments, add more report on exit
zenixls2 Jun 9, 2022
bf6726a
fix: output color output to stderr
zenixls2 Jun 13, 2022
9c70ec2
Merge pull request #647 from zenixls2/feature/ewo_emv
zenixls2 Jun 14, 2022
e261d2c
Merge pull request #714 from c9s/improve/sync-symbol-opt
c9s Jun 14, 2022
51ca1f5
api: support typescript
ycdesu Jun 14, 2022
99537a8
util: create throttle func
ycdesu Jun 14, 2022
258675b
frontend: implement sync button
ycdesu Jun 14, 2022
19dfd6d
frontend: run prettier
ycdesu Jun 14, 2022
686d1dc
feature: add basic implementation of alma indicator
zenixls2 Jun 10, 2022
f2c5ef2
feature: alma indicator add test
zenixls2 Jun 14, 2022
ea88e84
Merge pull request #715 from c9s/yc/on-demand-sync-button
ycdesu Jun 14, 2022
b8ce532
frontend: do not block ui while syncing
ycdesu Jun 14, 2022
9c525e5
frontend: trigger sync when entering the page
ycdesu Jun 14, 2022
b2ba0a8
frontend: yarn prettier
ycdesu Jun 14, 2022
b47d103
xmaker: pull out band value to fixedpoint
c9s Jun 14, 2022
5210b97
xmaker: update klines to boll indicator
c9s Jun 14, 2022
5aa2f8a
xmaker: skip quoting if bb value is zero
c9s Jun 14, 2022
2ed5b4b
Merge pull request #717 from c9s/fix/xmaker
c9s Jun 14, 2022
92b21e8
Merge pull request #707 from zenixls2/feature/alma
zenixls2 Jun 15, 2022
276319c
frontend: useInterval hook
ycdesu Jun 15, 2022
93f7616
frontend: define syncing enum
ycdesu Jun 15, 2022
52ae59e
frontend: show syncing status
ycdesu Jun 15, 2022
bee85f7
fix: sync api guard condition
ycdesu Jun 15, 2022
2d18e3e
Merge pull request #716 from c9s/yc/do-not-block-syncing
c9s Jun 15, 2022
d967525
optimizer: bool type parameter
andycheng123 Jun 15, 2022
91e4003
strategy: prevent supertrend from open extra position
andycheng123 Jun 15, 2022
ae93597
indicator: fix wrong supertrend signal due to atr window not satisfie…
andycheng123 Jun 15, 2022
99c4dc9
optimizer: front end kline url
andycheng123 Jun 15, 2022
84a00a8
Merge pull request #718 from c9s/yc/fix/syncing
ycdesu Jun 15, 2022
22d5b6e
move max api files
c9s Jun 14, 2022
694c226
Merge pull request #719 from andycheng123/improve/optimizer
c9s Jun 15, 2022
b824764
fix futures mode not use futures kline data.
ankion Jun 15, 2022
7b31f08
optimizer: use moment.js
andycheng123 Jun 15, 2022
46375eb
add strategies route
jundesu Jun 13, 2022
3faf389
strategy draft
jundesu Jun 14, 2022
9d2082d
mock queryStrategiesMetrics
jundesu Jun 15, 2022
19db5b3
grid panel draft
jundesu Jun 15, 2022
21ec4fd
run prettier
jundesu Jun 15, 2022
f4c4d63
feature: add Ehler's Super smoother filter
zenixls2 Jun 15, 2022
f19e1fd
rebalance: rename methods
narumiruna Jun 15, 2022
a481495
rebalance: remove ignoreLock and simplify code
narumiruna Jun 15, 2022
87adf69
rebalance: manage active order book without specifying symbol
narumiruna Jun 15, 2022
21a793e
rebalance: rename variable
narumiruna Jun 15, 2022
ad98cf8
rebalance: remove unused subscriptions
narumiruna Jun 15, 2022
20aa748
Merge pull request #722 from ankion/fix_futures_kline
c9s Jun 15, 2022
4ef10d1
Merge pull request #713 from andycheng123/improve/share-kline
c9s Jun 15, 2022
fc340c2
Merge pull request #725 from narumiruna/rebalance/activeorderbook
c9s Jun 15, 2022
0a602bc
rebalance: add ValueMap
narumiruna Jun 15, 2022
3d0ad01
rebalance: replace Float64Slice by ValueMap
narumiruna Jun 15, 2022
8d9faff
rebalance: validate symbols
narumiruna Jun 15, 2022
026910b
Merge pull request #726 from narumiruna/rebalance/valuemap
c9s Jun 16, 2022
0377ecd
fix: ssf less indent
zenixls2 Jun 16, 2022
aec1973
Merge pull request #724 from c9s/grid-panel
c9s Jun 16, 2022
b691572
Merge pull request #723 from zenixls2/feature/ssf
zenixls2 Jun 16, 2022
4b14e7f
refactor maxapi files
c9s Jun 16, 2022
303ed8a
update command doc files
c9s Jun 16, 2022
4af722e
bump version to v1.34.0
c9s Jun 16, 2022
2cfdc6d
add v1.34.0 release note
c9s Jun 16, 2022
f9a18e0
Merge pull request #729 from c9s/improve/maxapi
c9s Jun 16, 2022
0aa606e
maxapi: drop unused v2 api
c9s Jun 16, 2022
500dc64
maxapi: drop unused v2 order api
c9s Jun 16, 2022
df89183
Merge pull request #730 from c9s/improve/maxapi
c9s Jun 16, 2022
5799497
marketp: add marketcap strategy
narumiruna Jun 15, 2022
50fbf07
types: move valuemap and floatmap to types
narumiruna Jun 16, 2022
f6770df
supertrend: log with symbol
andycheng123 Jun 16, 2022
0a4379e
feature: add dmi indicator
zenixls2 Jun 16, 2022
126974c
feature: dmi add test, fix: rma with Adjust setting (follow the imple…
zenixls2 Jun 16, 2022
8b52743
define grid strategy interface
jundesu Jun 16, 2022
54d17cb
extract components
jundesu Jun 16, 2022
575d0d2
generate eleven mock data
jundesu Jun 16, 2022
12164b6
prettier
jundesu Jun 16, 2022
95b4a51
add missing import
jundesu Jun 16, 2022
d3d685b
Merge pull request #727 from narumiruna/marketcap/init
c9s Jun 16, 2022
7225a59
Merge pull request #728 from zenixls2/feature/dmi
c9s Jun 16, 2022
f500775
feature: add heikinashi support
zenixls2 Jun 15, 2022
55f36b2
supertrend: add comment to make the condition clearer
andycheng123 Jun 17, 2022
5c8cc39
Merge pull request #720 from andycheng123/fix/supertrend
andycheng123 Jun 17, 2022
aa8d188
fix: rename useHeikinAshi to heikinAshi in config
zenixls2 Jun 17, 2022
d33b12a
Merge pull request #721 from zenixls2/feature/heikinashi_session
zenixls2 Jun 17, 2022
ce63723
maxapi: drop unused functions
c9s Jun 17, 2022
aedd3e7
maxapi: drop unused mustParseURL
c9s Jun 17, 2022
f81633c
upgrade rockhopper
c9s Jun 17, 2022
f13e39a
avoid running truncate table in the migration script
c9s Jun 17, 2022
daaa335
compile and update migration package
c9s Jun 17, 2022
d15395d
update command doc files
c9s Jun 17, 2022
fc9d5f7
bump version to v1.35.0
c9s Jun 17, 2022
1000214
add v1.35.0 release note
c9s Jun 17, 2022
55fa4cc
fix: apply gofmt on all files, add revive action
zenixls2 Jun 17, 2022
ba1342c
feature: add pre-commit
zenixls2 Jun 17, 2022
2b25c94
recreate infinity grid
ksidenko Jun 17, 2022
2d08747
fix: go get binary path
zenixls2 Jun 17, 2022
933c90e
fix: split golangci-lint to separate file
zenixls2 Jun 17, 2022
dca80cf
fix: move gofmt to golintci, disable most of the checks
zenixls2 Jun 17, 2022
0c7a98c
fix: race condition in buffer
zenixls2 Jun 17, 2022
f25f2f0
Merge pull request #734 from zenixls2/feature/lint_fmt_check
c9s Jun 17, 2022
01202e3
Merge pull request #732 from c9s/refactor-grid-panel
c9s Jun 17, 2022
a5ffca7
fix: gosimple alert
zenixls2 Jun 17, 2022
0a07479
fix: increase golangci timeout
zenixls2 Jun 17, 2022
ac404b2
make default sync simple
c9s Jun 17, 2022
ee1ba41
rewrite reward sync
c9s Jun 17, 2022
d6f2f40
max: add limit to the closed order query
c9s Jun 17, 2022
d2d6b84
service: add reward stringer support
c9s Jun 17, 2022
8038b7a
service: drop unused queryLast method
c9s Jun 17, 2022
2eeb907
Merge pull request #737 from c9s/refactor/reward-sync
c9s Jun 17, 2022
2fb36f4
binance: add binance spot rebate history support
c9s Jun 17, 2022
24fc5c2
Merge pull request #736 from zenixls2/feature/lint_fmt_check
c9s Jun 17, 2022
ed19d03
Merge pull request #738 from c9s/feature/binance-rebate-history
c9s Jun 17, 2022
687be4a
fix Withdraw stringer format
c9s Jun 17, 2022
807a3e1
pivotshort: split trade collector callbacks
c9s Jun 18, 2022
0326c34
pivotshort: pull out GeneralOrderExecutor
c9s Jun 18, 2022
47e76a9
pivotshort: refactor and redesign order executor
c9s Jun 18, 2022
d367186
pivotshort: clean up and pull out order executor
c9s Jun 18, 2022
6cae9e7
move GeneralOrderExecutor into bbgo package
c9s Jun 18, 2022
c80fe1a
pivotshort: call BindTradeStats
c9s Jun 18, 2022
b9425e2
fix all fixedpoint issues
ksidenko Jun 18, 2022
f30d078
Merge pull request #739 from c9s/improve/order-executor
c9s Jun 18, 2022
dd01460
refactor initial order quantity, but it's not work
ksidenko Jun 18, 2022
523e7df
fix merge conflict, revert original pkg import order
ksidenko Jun 18, 2022
88e83c9
pivotshort: clean up log
c9s Jun 19, 2022
eacd1f1
all: rewrite notification api
c9s Jun 19, 2022
88a63df
all: clean up notifiability usage
c9s Jun 19, 2022
1562194
all: clean up bbgo.Notifiability
c9s Jun 19, 2022
bce64df
Merge pull request #742 from c9s/improve/notify-api
c9s Jun 19, 2022
cb9ce75
strategy/bollmaker: refactor and clean up
c9s Jun 19, 2022
d6daac1
Merge pull request #743 from c9s/improve/notify-api
c9s Jun 19, 2022
b6d1b43
refactor and update the support strategy
c9s Jun 19, 2022
f035667
support: refactor trailing stop order management
c9s Jun 19, 2022
6b26d5a
config: clean up the support config
c9s Jun 19, 2022
bf0186c
fix batch buffer size check
c9s Jun 19, 2022
6e562e2
increase batch insert size to 1000 for klines
c9s Jun 19, 2022
2a1bedd
support: fix support strategy stop order update
c9s Jun 19, 2022
4cb0b1c
Merge pull request #744 from c9s/refactor/support
c9s Jun 19, 2022
ee89a1c
depth: do not test depth buffer when race is on
c9s Jun 19, 2022
d1b8710
add export symbol comment
c9s Jun 20, 2022
695d948
Merge pull request #745 from c9s/fix/depth-test
c9s Jun 20, 2022
3a07218
optimizer: close config file handle
c9s Jun 20, 2022
dd087b2
optimizer: refactor LocalProcessExecutor and pull out config test
c9s Jun 20, 2022
2484405
pivotshort: add strategy controller
andycheng123 Jun 20, 2022
6669db4
optimizer: refactor Execute method
c9s Jun 20, 2022
aa9296e
strategy/supertrend: use new order executor api
andycheng123 Jun 20, 2022
cc7b8c8
bollmaker: remove redundant code for adapting new order executor api
andycheng123 Jun 20, 2022
9be38e2
optimizer: support multi metric value functions
c9s Jun 20, 2022
626934a
move out label copy and params copy to the outside of the loop
c9s Jun 20, 2022
6afe2de
optimizer: add parallel local process worker support for optimizer
c9s Jun 20, 2022
c227272
rsmaker: add bulit-in strategy
austin362667 May 17, 2022
dd85939
rsmaker: add bulit-in strategy
austin362667 May 17, 2022
2f18ea2
rsmaker: refactor active OB
austin362667 Jun 19, 2022
574e579
Merge pull request #639 from c9s/strategy/rsmaker
c9s Jun 20, 2022
74e8540
Merge pull request #749 from c9s/improve/optimizer-local-proc
c9s Jun 20, 2022
0e877b7
Merge pull request #748 from andycheng123/improve/bollmaker
c9s Jun 20, 2022
58c819b
bbgo: pull out PersistenceServiceFacade to singleton
c9s Jun 20, 2022
19d8013
bbgo: optimize order cancel for back-testing
c9s Jun 20, 2022
223b3dd
Merge pull request #747 from andycheng123/improve/supertrend-strategy
c9s Jun 20, 2022
d53176a
Merge pull request #746 from andycheng123/improve/pivotshort-control
c9s Jun 20, 2022
9f2b810
reformat go code
c9s Jun 20, 2022
92882c9
Merge pull request #751 from c9s/fix/lint-issues
c9s Jun 20, 2022
6d0a24c
upgrade nextjs from 11 to 12
ycdesu Jun 20, 2022
84986e1
remove postcss
ycdesu Jun 21, 2022
a41364b
yarn upgrade --force --latest
ycdesu Jun 21, 2022
4fa89e2
upgrade all packages
ycdesu Jun 21, 2022
7031969
Merge pull request #752 from c9s/upgrade-nextjs-11-to-12
ycdesu Jun 21, 2022
edfdb5b
optimizer: add max num of thread in config
andycheng123 Jun 21, 2022
1668259
Merge pull request #753 from andycheng123/improve/optimizer-config
c9s Jun 21, 2022
9b82de5
refine optimizer executor config structure
c9s Jun 21, 2022
612df45
Merge pull request #750 from c9s/refactor/persistence-singleton
c9s Jun 21, 2022
689a12d
optimizer: refactor max num of process config
andycheng123 Jun 21, 2022
7c9ad53
bbgo: call global persistence facade to sync data
c9s Jun 21, 2022
41a3d92
Merge pull request #754 from andycheng123/refactor/optimizer-config
c9s Jun 21, 2022
06de735
ci: add pip to cache
c9s Jun 21, 2022
c4ac2a2
remove pre-commit from ci
c9s Jun 21, 2022
5b239ad
Merge pull request #755 from c9s/improve/persistence-api
c9s Jun 21, 2022
44cf48a
Merge branch 'c9s:main' into recreate-infinity-grid
ksidenko Jun 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/contracts
.env.*
/linode
/frontend
/desktop
3 changes: 3 additions & 0 deletions .evans.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default]
protoFile = ["pkg/pb/bbgo.proto"]
package = "bbgo"
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: c9s
custom: [https://etherscan.io/address/0x5ed8508e3d046cbe9ff44d6063e29349000c8ddd]
53 changes: 53 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docker Image

on:
workflow_dispatch:
inputs:
ref:
description: 'ref to build'
required: false
default: 'main'
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10
branches:
- "main"

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
yoanlin/bbgo
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
# tags: yoanlin/bbgo:latest
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
90 changes: 90 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Go

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
redis-version:
- 6.2
env:
MYSQL_DATABASE: bbgo
MYSQL_USER: "root"
MYSQL_PASSWORD: "root" # pragma: allowlist secret

steps:

- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.MYSQL_DATABASE }};' -u${{ env.MYSQL_USER }} -p${{ env.MYSQL_PASSWORD }}

- name: Set up redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: ${{ matrix.redis-version }}
# auto-start: "false"

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Install Migration Tool
run: go install github.com/c9s/rockhopper/cmd/[email protected]

- name: Test Migration SQL Files For MySQL
run: |
rockhopper --config rockhopper_mysql.yaml up

- name: Test Migration SQL Files For SQLite
run: |
rockhopper --config rockhopper_sqlite.yaml up

- name: Build
run: go build -v ./cmd/bbgo

- name: Test
run: |
go test -race -coverprofile coverage.txt -covermode atomic ./pkg/...
sed -i -e '/_requestgen.go/d' coverage.txt

- name: TestDnum
run: |
go test -race -coverprofile coverage_dnum.txt -covermode atomic -tags dnum ./pkg/...
sed -i -e '/_requestgen.go/d' coverage_dnum.txt

- name: Revive Check
uses: morphy2k/revive-action@v2
with:
reporter: github-pr-review
fail_on_error: true

- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt,./coverage_dnum.txt

- name: Create dotenv file
run: |
echo "DB_DRIVER=mysql" >> .env.local
echo "DB_DSN=root:root@/bbgo" >> .env.local

22 changes: 22 additions & 0 deletions .github/workflows/golang-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: golang-lint
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.46.2
40 changes: 40 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Node.js CI

on:
push:
branches: [ main ]
paths:
- apps/backtest-report
- frontend
pull_request:
branches: [ main ]
paths:
- apps/backtest-report
- frontend

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 16.x ]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- name: Install
run: yarn install
working-directory: "apps/backtest-report"
- name: Build
run: yarn run next build
working-directory: "apps/backtest-report"
- name: Export
run: yarn run next export
working-directory: "apps/backtest-report"
- run: yarn export
working-directory: "frontend"
48 changes: 48 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Python

on:
push:
branches: [ main ]
paths:
- python

pull_request:
branches: [ main ]
paths:
- python

jobs:

build:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ 3.8 ]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: pip install poetry==1.1.13

- name: Install package
run: |
cd python
poetry install

- name: Test
run: |
cd python
poetry run pytest -v -s tests

- name: Lint
run: |
cd python
poetry run flake8 .
Loading