-
Notifications
You must be signed in to change notification settings - Fork 2k
58 lines (49 loc) · 1.74 KB
/
Copy pathtests.yml
File metadata and controls
58 lines (49 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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, 'dev-*' ]
pull_request:
branches: [ master, 'dev-*' ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
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
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
pip install --upgrade pip wheel setuptools
pip install -r requirements_test.txt
pip install flake8
- name: Build cython modules in-place
run: |
python setup.py build_ext --inplace
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 talib --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 talib --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
PYTHONPATH=. pytest