2424 runs-on : ${{ matrix.os }}
2525 strategy :
2626 matrix :
27- os : [ "ubuntu-22.04", "ubuntu-24.04", "macos-14", "macos-15" ]
27+ os : [ "ubuntu-22.04", "ubuntu-24.04", "macos-14", "macos-15" , "windows-2022", "windows-2025" ]
2828 python-version : ["3.11", "3.12", "3.13"]
2929
3030 steps :
6767 - name : Tests
6868 if : (!(runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04'))
6969 run : |
70- pytest --random-order
70+ pytest --random-order --durations 20
7171
7272 - name : Tests with Coveralls
7373 if : (runner.os == 'Linux' && matrix.python-version == '3.12' && matrix.os == 'ubuntu-24.04')
@@ -135,91 +135,13 @@ jobs:
135135 ruff format --check
136136
137137 - name : Mypy
138- if : matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15'
139- run : |
140- mypy freqtrade scripts tests
141-
142- - name : Discord notification
143- uses : rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f # v2.2.1
144- if : failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
145- with :
146- severity : error
147- details : Freqtrade CI failed on ${{ matrix.os }}
148- webhookUrl : ${{ secrets.DISCORD_WEBHOOK }}
149-
150- build-windows :
151- name : " Tests and Linting - Windows"
152- runs-on : ${{ matrix.os }}
153- strategy :
154- matrix :
155- os : [ "windows-2022", "windows-2025" ]
156- python-version : ["3.11", "3.12", "3.13"]
157-
158- steps :
159- - uses : actions/checkout@v5
160- with :
161- persist-credentials : false
162-
163- - name : Set up Python
164- uses : actions/setup-python@v6
165- with :
166- python-version : ${{ matrix.python-version }}
167-
168- - name : Install uv
169- uses : astral-sh/setup-uv@b75a909f75acd358c2196fb9a5f1299a9a8868a4 # v6.7.0
170- with :
171- activate-environment : true
172- enable-cache : true
173- python-version : ${{ matrix.python-version }}
174- cache-dependency-glob : " requirements**.txt"
175- cache-suffix : " ${{ matrix.python-version }}"
176-
177- - name : Installation
178- run : |
179- uv pip install -r requirements-dev.txt
180- uv pip install -e .
181-
182- - name : Tests
183- run : |
184- pytest --random-order --durations 20 -n auto
185-
186- - name : Check for repository changes
187- run : |
188- if (git status --porcelain) {
189- Write-Host "Repository is dirty, changes detected:"
190- git status
191- git diff
192- exit 1
193- }
194- else {
195- Write-Host "Repository is clean, no changes detected."
196- }
197-
198- - name : Backtesting
199- run : |
200- cp tests/testdata/config.tests.json config.json
201- freqtrade create-userdir --userdir user_data
202- freqtrade backtesting --datadir tests/testdata --strategy SampleStrategy
203-
204- - name : Hyperopt
205- run : |
206- cp tests/testdata/config.tests.json config.json
207- freqtrade create-userdir --userdir user_data
208- freqtrade hyperopt --datadir tests/testdata -e 5 --strategy SampleStrategy --hyperopt-loss SharpeHyperOptLossDaily --print-all
209-
210- - name : Run Ruff
211- run : |
212- ruff check --output-format=github
213-
214- - name : Run Ruff format check
215- run : |
216- ruff format --check
217-
218- - name : Mypy
138+ if : ${{ matrix.os == 'ubuntu-24.04' || matrix.os == 'macos-15' }}
219139 run : |
220140 mypy freqtrade scripts tests
221141
222142 - name : Run Pester tests (PowerShell)
143+ if : ${{ runner.os == 'Windows' }}
144+ shell : powershell
223145 run : |
224146 $PSVersionTable
225147 Set-PSRepository psgallery -InstallationPolicy trusted
@@ -228,14 +150,12 @@ jobs:
228150 Invoke-Pester -Path "tests" -CI
229151 if ($Error.Length -gt 0) {exit 1}
230152
231- shell : powershell
232-
233153 - name : Discord notification
234154 uses : rjstone/discord-webhook-notify@c2597273488aeda841dd1e891321952b51f7996f # v2.2.1
235- if : failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false)
155+ if : ${{ failure() && ( github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false) }}
236156 with :
237157 severity : error
238- details : Test Failed
158+ details : Freqtrade CI failed on ${{ matrix.os }} with Python ${{ matrix.python-version }}!
239159 webhookUrl : ${{ secrets.DISCORD_WEBHOOK }}
240160
241161 mypy-version-check :
@@ -341,7 +261,6 @@ jobs:
341261 notify-complete :
342262 needs : [
343263 tests,
344- build-windows,
345264 docs-check,
346265 mypy-version-check,
347266 pre-commit,
@@ -373,7 +292,7 @@ jobs:
373292
374293 build :
375294 name : " Build"
376- needs : [ tests, build-windows, docs-check, mypy-version-check, pre-commit ]
295+ needs : [ tests, docs-check, mypy-version-check, pre-commit ]
377296 runs-on : ubuntu-22.04
378297
379298 steps :
@@ -472,7 +391,6 @@ jobs:
472391 name : " Docker Build and Deploy"
473392 needs : [
474393 tests,
475- build-windows,
476394 docs-check,
477395 mypy-version-check,
478396 pre-commit
0 commit comments