@@ -16,25 +16,16 @@ jobs:
16
16
linting :
17
17
runs-on : ubuntu-latest
18
18
steps :
19
- # ----------------------------------------------
20
- # check-out repo and set-up python
21
- # ----------------------------------------------
22
19
- uses : actions/checkout@v4
23
20
- uses : actions/setup-python@v5
24
- # ----------------------------------------------
25
- # load pip cache if cache exists
26
- # ----------------------------------------------
27
21
- uses : actions/cache@v3
28
22
with :
29
23
path : ~/.cache/pip
30
24
key : ${{ runner.os }}-pip
31
25
restore-keys : ${{ runner.os }}-pip
32
- # ----------------------------------------------
33
- # install and run linters
34
- # ----------------------------------------------
35
26
- run : python -m pip install black flake8 isort
36
- - run : |
37
- flake8 ./investing_algorithm_framework
27
+ - run : flake8 ./investing_algorithm_framework
28
+
38
29
test :
39
30
needs : linting
40
31
strategy :
@@ -44,67 +35,35 @@ jobs:
44
35
python-version : [ "3.8", "3.9", "3.10", "3.11" ]
45
36
runs-on : ${{ matrix.os }}
46
37
steps :
47
- # ----------------------------------------------
48
- # check-out repo and set-up python
49
- # ----------------------------------------------
50
- - name : Check out repository
51
- uses : actions/checkout@v4
52
- - name : Set up python ${{ matrix.python-version }}
53
- id : setup-python
54
- uses : actions/setup-python@v5
38
+ - uses : actions/checkout@v4
39
+ - uses : actions/setup-python@v5
55
40
with :
56
41
python-version : ${{ matrix.python-version }}
57
- # ----------------------------------------------
58
- # ----- install distutils if needed -----
59
- # ----------------------------------------------
60
42
- name : Install distutils on Ubuntu
61
43
if : matrix.os == 'ubuntu-latest'
62
44
run : |
63
45
sudo add-apt-repository ppa:deadsnakes/ppa
64
46
sudo apt-get update
65
47
sudo apt install python${{ matrix.python-version }}-distutils
66
- # ----------------------------------------------
67
- # ----- install & configure poetry -----
68
- # ----------------------------------------------
69
48
- name : Install Poetry
70
49
uses : snok/install-poetry@v1
71
50
with :
72
51
virtualenvs-create : true
73
52
virtualenvs-in-project : true
74
- # ----------------------------------------------
75
- # load cached venv if cache exists
76
- # ----------------------------------------------
77
53
- name : Load cached venv
78
54
id : cached-poetry-dependencies
79
55
uses : actions/cache@v3
80
56
with :
81
57
path : .venv
82
58
key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
83
- # ----------------------------------------------
84
- # install dependencies if cache does not exist
85
- # ----------------------------------------------
86
- - name : Install dependencies
59
+ - name : Install all dependencies, including indicators
87
60
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
88
61
run : |
89
- poetry install --no-interaction --no-root
90
- # ----------------------------------------------
91
- # install your root project, if required
92
- # ----------------------------------------------
93
- - name : Install library
62
+ poetry install --no-interaction --all-extras
63
+ - name : Confirm indicators dependencies installed
94
64
run : |
95
- poetry install --no-interaction --extras indicators
96
- # ----------------------------------------------
97
- # add matrix specifics and run test suite
98
- # ----------------------------------------------
65
+ source .venv/bin/activate
66
+ poetry show | grep -E 'numpy|scipy|tulipy'
99
67
- name : Run tests
100
68
run : |
101
- source .venv/bin/activate
102
- coverage run -m unittest discover -s tests
103
- # #----------------------------------------------
104
- # # upload coverage stats
105
- # #----------------------------------------------
106
- # - name: Upload coverage
107
- # uses: codecov/codecov-action@v3
108
- # with:
109
- # file: ./coverage.xml
110
- # fail_ci_if_error: true
69
+ poetry run coverage run -m unittest discover -s tests
0 commit comments