-
Notifications
You must be signed in to change notification settings - Fork 72
49 lines (45 loc) · 1.71 KB
/
cron.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: OctoBot-Tentacles-Cron
on:
schedule:
- cron: '0 5 * * *' # every day at 5am
jobs:
cron-tests:
name: ubuntu-latestx64 - Python 3.10 - tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
architecture: 'x64'
- name: Install OctoBot on Unix
env:
OCTOBOT_GH_REPO: https://github.com/Drakkar-Software/OctoBot.git
OCTOBOT_DEFAULT_BRANCH: dev
run: |
TARGET_BRANCH=$([ "$GITHUB_HEAD_REF" == "" ] && echo ${GITHUB_REF##*/} || echo "$GITHUB_HEAD_REF")
git clone -q $OCTOBOT_GH_REPO -b ${TARGET_BRANCH} || git clone -q $OCTOBOT_GH_REPO -b $OCTOBOT_DEFAULT_BRANCH
cd OctoBot
git status
pip install --prefer-binary -r dev_requirements.txt -r requirements.txt
cd ..
mkdir new_tentacles
cp -r Backtesting Evaluator Services Trading profiles new_tentacles
cd OctoBot
python start.py tentacles -d "../new_tentacles" -p "../../any_platform.zip"
python start.py tentacles --install --location "../any_platform.zip" --all
- name: Pytests
env:
BINANCE_API_KEY: ${{ secrets.BINANCE_API_KEY }}
BINANCE_API_SECRET: ${{ secrets.BINANCE_API_SECRET }}
run: |
cd OctoBot
pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tentacles/Trading/Exchange
notify:
if: ${{ failure() }}
needs:
- cron-tests
uses: Drakkar-Software/.github/.github/workflows/failure_notify_workflow.yml@master
secrets:
DISCORD_GITHUB_WEBHOOK: ${{ secrets.DISCORD_GITHUB_WEBHOOK }}