Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Tests

# master and the dev-* release branches test against the TA-Lib C release the
# wheels are built from. dev tracks TA-Lib C's dev branch, in tests-dev.yml.
on:
push:
branches: [ master ]
branches: [ master, 'dev-*' ]
pull_request:
branches: [ master ]
branches: [ master, 'dev-*' ]

jobs:
build:
Expand All @@ -15,8 +17,18 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: TA-Lib C version
id: talib_c
run: |
set -euo pipefail
V=$(sed -n 's/^ TALIB_C_VER: *//p' .github/workflows/wheels.yml)
[ -n "$V" ] || { echo "::error::no TALIB_C_VER in wheels.yml"; exit 1; }
echo "version=$V" >> "$GITHUB_OUTPUT"

- name: Set up TA-Lib
uses: TA-Lib/setup-ta-lib@v1
with:
version: ${{ steps.talib_c.outputs.version }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand Down
4 changes: 3 additions & 1 deletion tests/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@


def test_talib_version():
assert talib.__ta_version__[:5] == b'0.8.1'
required = (0, 8, 1)
installed = tuple(int(p) for p in talib.__ta_version__.split()[0].split(b'.'))
assert installed >= required


def test_num_functions():
Expand Down
Loading