1
1
name : OctoBot-Market-Making-CI
2
2
on :
3
3
push :
4
- branches :
5
- - ' master'
6
- - ' dev'
7
4
tags :
8
5
- ' *'
9
6
pull_request :
26
23
architecture : ${{ matrix.arch }}
27
24
28
25
- 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
41
27
42
28
- name : Pylint
43
29
run : |
50
36
runs-on : ${{ matrix.os }}
51
37
strategy :
52
38
matrix :
53
- os : [ macos-13, windows-latest, ubuntu-latest ]
39
+ os : [ ubuntu-latest ]
54
40
arch : [ x64 ]
55
41
python : [ '3.10' ]
56
42
@@ -62,52 +48,11 @@ jobs:
62
48
python-version : ${{ matrix.python }}
63
49
architecture : ${{ matrix.arch }}
64
50
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
107
53
108
54
- 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
111
56
112
57
publish :
113
58
needs : tests
0 commit comments