Skip to content

Commit

Permalink
Update GitHub Actions workflow to support multi-platform testing
Browse files Browse the repository at this point in the history
- Enable testing across Ubuntu, macOS, and Windows platforms
- Expand Python version support to 3.10, 3.11, 3.12, and 3.13
- Remove TA-Lib installation steps from workflow configuration
- Simplify dependency installation process
  • Loading branch information
saleh-mir committed Feb 11, 2025
1 parent ca9c563 commit 85f3024
Showing 1 changed file with 2 additions and 43 deletions.
45 changes: 2 additions & 43 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
# os: [ubuntu-latest]
include:
- os: ubuntu-latest
path: ~/.cache/pip
Expand All @@ -30,7 +30,6 @@ jobs:
# python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.10', '3.11', '3.12', '3.13']


steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -46,40 +45,6 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up ta-lib dir
if: ${{ runner.os == 'Linux' }}
run: |
mkdir -p $HOME/.local/ta-lib
echo "LD_LIBRARY_PATH=$HOME/.local/ta-lib/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "TA_INCLUDE_PATH=$HOME/.local/ta-lib/include" >> $GITHUB_ENV
echo "TA_LIBRARY_PATH=$HOME/.local/ta-lib/lib" >> $GITHUB_ENV
- name: Set up ta-lib cache
if: ${{ runner.os == 'Linux' }}
uses: actions/cache@v2
id: talib-cache
with:
path: |
~/.local/ta-lib/lib
~/.local/ta-lib/include
key: talib-cache-v0.6.0
- name: Install ta-lib mac / windows
run: |
if ([ "$RUNNER_OS" = "macOS" ]); then
brew install ta-lib
fi
if ([ "$RUNNER_OS" = "Windows" ]); then
curl -sL http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.6.0-msvc.zip -o $GITHUB_WORKSPACE/ta-lib.zip --create-dirs && 7z x $GITHUB_WORKSPACE/ta-lib.zip -o/c/ta-lib && mv /c/ta-lib/ta-lib/* /c/ta-lib/ && rm -rf /c/ta-lib/ta-lib && cd /c/ta-lib/c/make/cdr/win32/msvc && nmake
fi
- name: Install ta-lib Linux
if: steps.talib-cache.outputs.cache-hit != 'true'
run: |
wget https://github.com/TA-Lib/ta-lib/releases/download/v0.6.1/ta-lib-0.6.1-src.tar.gz -q
tar -xzf ta-lib-0.6.1-src.tar.gz
cd ta-lib-0.6.1/
./configure --prefix=$HOME/.local/ta-lib
make
sudo make install
cd
- name: Install dependencies
run: |
python -m ensurepip --upgrade
Expand All @@ -88,12 +53,6 @@ jobs:
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ ! ${{ matrix.python-version }} = "3.10" ]; then pip install numba; fi
pip install -e . -U
# - name: Lint with flake8
# run: |
# stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pip install pytest
Expand Down

0 comments on commit 85f3024

Please sign in to comment.