Skip to content

Commit de2bd2d

Browse files
committed
[CI] add GH CI
1 parent bb60432 commit de2bd2d

File tree

4 files changed

+743
-3
lines changed

4 files changed

+743
-3
lines changed

.coveragerc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[run]
2+
omit =
3+
setup.py
4+
start.py

.github/workflows/main.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: OctoBot-Market-Making-CI
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
- 'dev'
7+
tags:
8+
- '*'
9+
pull_request:
10+
11+
jobs:
12+
lint:
13+
name: ${{ matrix.os }}${{ matrix.arch }} - Python ${{ matrix.version }} - lint
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
arch: [ x64 ]
19+
version: [ "3.10.x" ]
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Set up Python ${{ matrix.version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.version }}
26+
architecture: ${{ matrix.arch }}
27+
28+
- name: Install dependencies
29+
env:
30+
OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git
31+
OCTOBOT_DEFAULT_BRANCH: dev
32+
run: |
33+
echo "GITHUB_REF=$GITHUB_REF"
34+
TARGET_BRANCH=$([ "$GITHUB_HEAD_REF" == "" ] && echo ${GITHUB_REF##*/} || echo "$GITHUB_HEAD_REF")
35+
git clone -q $OCTOBOT_GH_REPO -b ${TARGET_BRANCH} || git clone -q $OCTOBOT_GH_REPO -b $OCTOBOT_DEFAULT_BRANCH
36+
cd OctoBot
37+
git status
38+
pip install -r dev_requirements.txt
39+
pip install .
40+
cd ..
41+
42+
- name: Pylint
43+
run: |
44+
pylint --rcfile=standard.rc octobot_market_making
45+
if [ $? -ne 1 ]; then exit 0; fi
46+
47+
tests:
48+
name: ${{ matrix.os }}${{ matrix.arch }} - Python - ${{ matrix.python }} - tests
49+
needs: lint
50+
runs-on: ${{ matrix.os }}
51+
strategy:
52+
matrix:
53+
os: [ macos-13, windows-latest, ubuntu-latest ]
54+
arch: [ x64 ]
55+
python: [ '3.10' ]
56+
57+
steps:
58+
- uses: actions/checkout@v4
59+
- name: Set up Python ${{ matrix.python }}
60+
uses: actions/setup-python@v5
61+
with:
62+
python-version: ${{ matrix.python }}
63+
architecture: ${{ matrix.arch }}
64+
65+
- name: Install OctoBot on Unix
66+
if: matrix.os != 'windows-latest'
67+
env:
68+
OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git
69+
OCTOBOT_DEFAULT_BRANCH: dev
70+
run: |
71+
echo "GITHUB_REF=$GITHUB_REF"
72+
TARGET_BRANCH=$([ "$GITHUB_HEAD_REF" == "" ] && echo ${GITHUB_REF##*/} || echo "$GITHUB_HEAD_REF")
73+
git clone -q $OCTOBOT_GH_REPO -b ${TARGET_BRANCH} || git clone -q $OCTOBOT_GH_REPO -b $OCTOBOT_DEFAULT_BRANCH
74+
cd OctoBot
75+
git status
76+
pip install -r dev_requirements.txt
77+
pip install .
78+
cd ..
79+
80+
- name: Install OctoBot on Windows
81+
if: matrix.os == 'windows-latest'
82+
env:
83+
OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git
84+
OCTOBOT_DEFAULT_BRANCH: dev
85+
run: |
86+
echo "GITHUB_REF=$env:GITHUB_REF"
87+
$env:TARGET_BRANCH = $env:GITHUB_REF
88+
If ((Test-Path env:GITHUB_HEAD_REF) -and -not ([string]::IsNullOrWhiteSpace($env:GITHUB_HEAD_REF))) {
89+
echo "using GITHUB_HEAD_REF"
90+
$env:TARGET_BRANCH = $env:GITHUB_HEAD_REF
91+
}
92+
echo "TARGET_BRANCH=$env:TARGET_BRANCH"
93+
If ($env:TARGET_BRANCH -notcontains "refs/tags/") {
94+
$env:TENTACLES_URL_TAG = "latest"
95+
}
96+
echo "cleaned TARGET_BRANCH=$env:TARGET_BRANCH"
97+
git clone -q $env:OCTOBOT_GH_REPO -b $env:TARGET_BRANCH.Replace('refs/heads/','')
98+
if ($LastExitCode -ne 0) {
99+
git clone -q $env:OCTOBOT_GH_REPO -b $env:OCTOBOT_DEFAULT_BRANCH
100+
}
101+
cd OctoBot
102+
git status
103+
pip install -r dev_requirements.txt
104+
pip install .
105+
cd ..
106+
shell: powershell
107+
108+
- name: Pytests
109+
run: |
110+
pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tests
111+
112+
publish:
113+
needs: tests
114+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
115+
uses: Drakkar-Software/.github/.github/workflows/python3_sdist_workflow.yml@master
116+
secrets:
117+
PYPI_OFFICIAL_UPLOAD_URL: ${{ secrets.PYPI_OFFICIAL_UPLOAD_URL }}
118+
PYPI_USERNAME: __token__
119+
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
120+
121+
notify:
122+
if: ${{ failure() }}
123+
needs:
124+
- lint
125+
- tests
126+
- publish
127+
uses: Drakkar-Software/.github/.github/workflows/failure_notify_workflow.yml@master
128+
secrets:
129+
DISCORD_GITHUB_WEBHOOK: ${{ secrets.DISCORD_GITHUB_WEBHOOK }}

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# OctoBot Market Making
22

3-
Version [2.0.9](https://github.com/Drakkar-Software/OctoBot-Market-Making/blob/master/CHANGELOG.md)
4-
53
Your automated market making strategy software to improve your crypto market liquidity.
64

75
- On more than 15 supported exchanges
@@ -78,4 +76,23 @@ OctoBot Market Making comes with a built-in trading simulator which you can use
7876

7977
OctoBot Market Making is the backbone of [OctoBot cloud Market Making](https://market-making.octobot.cloud/?utm_source=github&utm_medium=dk&utm_campaign=regular_open_source_content&utm_content=going_further_1), a self-service market making automation platform.
8078

81-
If you enjoy OctoBot Market Making and wish to automate more complex market making strategies or if you are looking for more capabilities in your market making requirements, [OctoBot cloud Market Making](https://market-making.octobot.cloud/?utm_source=github&utm_medium=dk&utm_campaign=regular_open_source_content&utm_content=going_further_2) might be the right platform for you.
79+
If you enjoy OctoBot Market Making and wish to automate more complex market making strategies or if you are looking for more capabilities in your market making requirements, [OctoBot cloud Market Making](https://market-making.octobot.cloud/?utm_source=github&utm_medium=dk&utm_campaign=regular_open_source_content&utm_content=going_further_2) might be the right platform for you.
80+
81+
## Hardware requirements
82+
- CPU : 1 Core / 1GHz
83+
- RAM : 250 MB
84+
- Disk : 1 GB
85+
86+
## Disclaimer
87+
Do not risk money which you are afraid to lose. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS
88+
AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.
89+
90+
Always start by running a trading bot in simulation mode and do not engage money
91+
before you understand how it works and what profit/loss you should expect.
92+
93+
Please feel free to read the source code and understand the mechanism of this bot.
94+
95+
## License
96+
GNU General Public License v3.0 or later.
97+
98+
See [GPL-3.0 LICENSE](https://github.com/Drakkar-Software/OctoBot-Market-Making/blob/master/LICENSE) to see the full text.

0 commit comments

Comments
 (0)