diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..f5c99b8 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,27 @@ +name: Run pytest on all branches + +on: push + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 # 使用するPythonのバージョンを指定してください + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pip install git+https://github.com/aoki-h-jp/binance-bulk-downloader + pipenv install --dev # Pipenvを使用して依存関係をインストール + + - name: Run pytest + run: | + pipenv run pytest -v -s # pytestを実行するコマンドを指定 diff --git a/README.md b/README.md index 762a700..2bfda1a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # binance-bulk-downloader [![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110//) [![Format code](https://github.com/aoki-h-jp/binance-bulk-downloader/actions/workflows/Formatter.yml/badge.svg?branch=main)](https://github.com/aoki-h-jp/binance-bulk-downloader/actions/workflows/Formatter.yml) +[![pytest](https://github.com/aoki-h-jp/binance-bulk-downloader/actions/workflows/pytest.yaml/badge.svg)](https://github.com/aoki-h-jp/binance-bulk-downloader/actions/workflows/pytest.yaml) ## Python library for bulk downloading Binance historical data A Python library to efficiently and concurrently download historical data files from Binance. Supports all asset types (spot, USDT-M, COIN-M, options) and all data frequencies. diff --git a/example/__init__.py b/example/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_aggtrades.py b/tests/test_aggtrades.py index 9ad287b..d5ae8e7 100644 --- a/tests/test_aggtrades.py +++ b/tests/test_aggtrades.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_aggtrades_test_params(): diff --git a/tests/test_bookdepth.py b/tests/test_bookdepth.py index ca17bc3..178461a 100644 --- a/tests/test_bookdepth.py +++ b/tests/test_bookdepth.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_bookdepth_test_params(): diff --git a/tests/test_bookticker.py b/tests/test_bookticker.py index 55c5f98..cbf0911 100644 --- a/tests/test_bookticker.py +++ b/tests/test_bookticker.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_bookticker_test_params(): diff --git a/tests/test_bvolindex.py b/tests/test_bvolindex.py index 136801b..a8a5c5c 100644 --- a/tests/test_bvolindex.py +++ b/tests/test_bvolindex.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_bvolindex_test_params(): diff --git a/tests/test_eohsummary.py b/tests/test_eohsummary.py index 993733d..3f28b8f 100644 --- a/tests/test_eohsummary.py +++ b/tests/test_eohsummary.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_eohsummary_test_params(): diff --git a/tests/test_fundingrate.py b/tests/test_fundingrate.py index 23894e4..2ef6b88 100644 --- a/tests/test_fundingrate.py +++ b/tests/test_fundingrate.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_fundingrate_test_params(): diff --git a/tests/test_indexpriceklines.py b/tests/test_indexpriceklines.py index 2777262..8846aa4 100644 --- a/tests/test_indexpriceklines.py +++ b/tests/test_indexpriceklines.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_indexpriceklines_test_params(): diff --git a/tests/test_klines.py b/tests/test_klines.py index fe13b9c..aef53da 100644 --- a/tests/test_klines.py +++ b/tests/test_klines.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_klines_test_params(): diff --git a/tests/test_liquidationsnapshot.py b/tests/test_liquidationsnapshot.py index b31bba4..9824d50 100644 --- a/tests/test_liquidationsnapshot.py +++ b/tests/test_liquidationsnapshot.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_liquidationsnapshot_test_params(): diff --git a/tests/test_markpriceklines.py b/tests/test_markpriceklines.py index 83bc6c0..334b322 100644 --- a/tests/test_markpriceklines.py +++ b/tests/test_markpriceklines.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_markpriceklines_test_params(): diff --git a/tests/test_metrics.py b/tests/test_metrics.py index b3f1d81..bfd924a 100644 --- a/tests/test_metrics.py +++ b/tests/test_metrics.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_metrics_test_params(): diff --git a/tests/test_premiumindexklines.py b/tests/test_premiumindexklines.py index 804bace..50f376d 100644 --- a/tests/test_premiumindexklines.py +++ b/tests/test_premiumindexklines.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_premiumindexklines_test_params(): diff --git a/tests/test_trades.py b/tests/test_trades.py index 756e067..2c1739e 100644 --- a/tests/test_trades.py +++ b/tests/test_trades.py @@ -5,7 +5,7 @@ import pytest # import my libraries -from downloader.downloader import * +from downloader import BinanceBulkDownloader def dynamic_trades_test_params():