Skip to content

Commit 9cb1d04

Browse files
committed
d
1 parent de2bd2d commit 9cb1d04

File tree

1 file changed

+5
-60
lines changed

1 file changed

+5
-60
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: OctoBot-Market-Making-CI
22
on:
33
push:
4-
branches:
5-
- 'master'
6-
- 'dev'
74
tags:
85
- '*'
96
pull_request:
@@ -26,18 +23,7 @@ jobs:
2623
architecture: ${{ matrix.arch }}
2724

2825
- 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 ..
26+
run: pip install -r requirements.txt -r dev_requirements.txt
4127

4228
- name: Pylint
4329
run: |
@@ -50,7 +36,7 @@ jobs:
5036
runs-on: ${{ matrix.os }}
5137
strategy:
5238
matrix:
53-
os: [ macos-13, windows-latest, ubuntu-latest ]
39+
os: [ ubuntu-latest ]
5440
arch: [ x64 ]
5541
python: [ '3.10' ]
5642

@@ -62,52 +48,11 @@ jobs:
6248
python-version: ${{ matrix.python }}
6349
architecture: ${{ matrix.arch }}
6450

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
51+
- name: Install dependencies
52+
run: pip install -r requirements.txt -r dev_requirements.txt
10753

10854
- name: Pytests
109-
run: |
110-
pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tests
55+
run: pytest --cov=. --cov-config=.coveragerc --durations=0 -rw tests
11156

11257
publish:
11358
needs: tests

0 commit comments

Comments
 (0)