forked from freqtrade/freqtrade
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into snyk-fix-abeeb1e8b8f8c19b0afd30d160cae0e9
- Loading branch information
Showing
153 changed files
with
5,368 additions
and
1,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,13 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ ubuntu-20.04, ubuntu-22.04 ] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -44,7 +44,6 @@ jobs: | |
|
||
- name: pip cache (linux) | ||
uses: actions/cache@v3 | ||
if: runner.os == 'Linux' | ||
with: | ||
path: ~/.cache/pip | ||
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip | ||
|
@@ -55,7 +54,6 @@ jobs: | |
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd .. | ||
- name: Installation - *nix | ||
if: runner.os == 'Linux' | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH | ||
|
@@ -122,18 +120,18 @@ jobs: | |
details: Freqtrade CI failed on ${{ matrix.os }} | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
build_macos: | ||
build-macos: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ macos-latest ] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
os: [ "macos-latest", "macos-13" ] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
check-latest: true | ||
|
@@ -143,39 +141,42 @@ jobs: | |
id: cache | ||
with: | ||
path: ~/dependencies/ | ||
key: ${{ runner.os }}-dependencies | ||
key: ${{ matrix.os }}-dependencies | ||
|
||
- name: pip cache (macOS) | ||
uses: actions/cache@v3 | ||
if: runner.os == 'macOS' | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip | ||
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip | ||
|
||
- name: TA binary *nix | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: | | ||
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd .. | ||
- name: Installation - macOS | ||
if: runner.os == 'macOS' | ||
run: | | ||
# brew update | ||
# TODO: Should be the brew upgrade | ||
# homebrew fails to update python due to unlinking failures | ||
# https://github.com/actions/runner-images/issues/6817 | ||
rm /usr/local/bin/2to3 || true | ||
rm /usr/local/bin/2to3-3.11 || true | ||
rm /usr/local/bin/2to3-3.12 || true | ||
rm /usr/local/bin/idle3 || true | ||
rm /usr/local/bin/idle3.11 || true | ||
rm /usr/local/bin/idle3.12 || true | ||
rm /usr/local/bin/pydoc3 || true | ||
rm /usr/local/bin/pydoc3.11 || true | ||
rm /usr/local/bin/pydoc3.12 || true | ||
rm /usr/local/bin/python3 || true | ||
rm /usr/local/bin/python3.11 || true | ||
rm /usr/local/bin/python3.12 || true | ||
rm /usr/local/bin/python3-config || true | ||
rm /usr/local/bin/python3.11-config || true | ||
rm /usr/local/bin/python3.12-config || true | ||
brew install hdf5 c-blosc | ||
brew install hdf5 c-blosc libomp | ||
python -m pip install --upgrade pip wheel | ||
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH | ||
export TA_LIBRARY_PATH=${HOME}/dependencies/lib | ||
|
@@ -231,19 +232,19 @@ jobs: | |
details: Test Succeeded! | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
build_windows: | ||
build-windows: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ windows-latest ] | ||
python-version: ["3.9", "3.10", "3.11"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
|
@@ -301,13 +302,13 @@ jobs: | |
details: Test Failed | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
mypy_version_check: | ||
mypy-version-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
|
@@ -321,12 +322,12 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- uses: pre-commit/[email protected] | ||
|
||
docs_check: | ||
docs-check: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -336,7 +337,7 @@ jobs: | |
./tests/test_docs.sh | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
|
@@ -362,9 +363,9 @@ jobs: | |
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.9" | ||
python-version: "3.11" | ||
|
||
- name: Cache_dependencies | ||
uses: actions/cache@v3 | ||
|
@@ -375,7 +376,6 @@ jobs: | |
|
||
- name: pip cache (linux) | ||
uses: actions/cache@v3 | ||
if: runner.os == 'Linux' | ||
with: | ||
path: ~/.cache/pip | ||
key: test-${{ matrix.os }}-${{ matrix.python-version }}-pip | ||
|
@@ -386,7 +386,6 @@ jobs: | |
cd build_helpers && ./install_ta-lib.sh ${HOME}/dependencies/; cd .. | ||
- name: Installation - *nix | ||
if: runner.os == 'Linux' | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
export LD_LIBRARY_PATH=${HOME}/dependencies/lib:$LD_LIBRARY_PATH | ||
|
@@ -399,17 +398,17 @@ jobs: | |
env: | ||
CI_WEB_PROXY: http://152.67.78.211:13128 | ||
run: | | ||
pytest --random-order --cov=freqtrade --cov-config=.coveragerc --longrun | ||
pytest --random-order --longrun --durations 20 -n auto --dist loadscope | ||
# Notify only once - when CI completes (and after deploy) in case it's successfull | ||
notify-complete: | ||
needs: [ | ||
build_linux, | ||
build_macos, | ||
build_windows, | ||
docs_check, | ||
mypy_version_check, | ||
build-macos, | ||
build-windows, | ||
docs-check, | ||
mypy-version-check, | ||
pre-commit, | ||
build_linux_online | ||
] | ||
|
@@ -436,44 +435,79 @@ jobs: | |
details: Test Completed! | ||
webhookUrl: ${{ secrets.DISCORD_WEBHOOK }} | ||
|
||
deploy: | ||
needs: [ build_linux, build_macos, build_windows, docs_check, mypy_version_check, pre-commit ] | ||
build: | ||
name: "Build" | ||
needs: [ build_linux, build-macos, build-windows, docs-check, mypy-version-check, pre-commit ] | ||
runs-on: ubuntu-22.04 | ||
|
||
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" | ||
id: extract_branch | ||
|
||
- name: Build distribution | ||
run: | | ||
pip install -U setuptools wheel | ||
python setup.py sdist bdist_wheel | ||
pip install -U build | ||
python -m build --sdist --wheel | ||
- name: Upload artifacts 📦 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: freqtrade-build | ||
path: | | ||
dist | ||
retention-days: 10 | ||
|
||
deploy-pypi: | ||
name: "Deploy to PyPI" | ||
needs: [ build ] | ||
runs-on: ubuntu-22.04 | ||
if: (github.event_name == 'release') | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/freqtrade | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download artifact 📦 | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: freqtrade-build | ||
path: dist | ||
|
||
- name: Publish to PyPI (Test) | ||
uses: pypa/[email protected] | ||
if: (github.event_name == 'release') | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_test_password }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/[email protected] | ||
if: (github.event_name == 'release') | ||
uses: pypa/[email protected] | ||
|
||
|
||
deploy-docker: | ||
needs: [ build_linux, build-macos, build-windows, docs-check, mypy-version-check, pre-commit ] | ||
runs-on: ubuntu-22.04 | ||
|
||
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade' | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
python-version: "3.11" | ||
|
||
- name: Extract branch name | ||
shell: bash | ||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})" | ||
id: extract_branch | ||
|
||
- name: Dockerhub login | ||
env: | ||
|
@@ -506,10 +540,11 @@ jobs: | |
run: | | ||
build_helpers/publish_docker_multi.sh | ||
deploy_arm: | ||
deploy-arm: | ||
name: "Deploy Docker" | ||
permissions: | ||
packages: write | ||
needs: [ deploy ] | ||
needs: [ deploy-docker ] | ||
# Only run on 64bit machines | ||
runs-on: [self-hosted, linux, ARM64] | ||
if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'release') && github.repository == 'freqtrade/freqtrade' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Pre-commit auto-update | ||
|
||
on: | ||
# every day at midnight | ||
schedule: | ||
- cron: "0 3 * * 2" | ||
# on demand | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
auto-update: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
|
||
- name: Install pre-commit | ||
run: pip install pre-commit | ||
|
||
- name: Run auto-update | ||
run: pre-commit autoupdate | ||
|
||
- name: Run pre-commit | ||
run: pre-commit run --all-files | ||
|
||
- uses: peter-evans/create-pull-request@v5 | ||
with: | ||
token: ${{ secrets.REPO_SCOPED_TOKEN }} | ||
add-paths: .pre-commit-config.yaml | ||
labels: | | ||
Tech maintenance | ||
branch: update/pre-commit-hooks | ||
title: Update pre-commit hooks | ||
commit-message: "chore: update pre-commit hooks" | ||
committer: Freqtrade Bot <[email protected]> | ||
body: Update versions of pre-commit hooks to latest version. | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.