@@ -16,25 +16,16 @@ jobs:
1616 linting :
1717 runs-on : ubuntu-latest
1818 steps :
19- # ----------------------------------------------
20- # check-out repo and set-up python
21- # ----------------------------------------------
2219 - uses : actions/checkout@v4
2320 - uses : actions/setup-python@v5
24- # ----------------------------------------------
25- # load pip cache if cache exists
26- # ----------------------------------------------
2721 - uses : actions/cache@v3
2822 with :
2923 path : ~/.cache/pip
3024 key : ${{ runner.os }}-pip
3125 restore-keys : ${{ runner.os }}-pip
32- # ----------------------------------------------
33- # install and run linters
34- # ----------------------------------------------
3526 - run : python -m pip install black flake8 isort
36- - run : |
37- flake8 ./investing_algorithm_framework
27+ - run : flake8 ./investing_algorithm_framework
28+
3829 test :
3930 needs : linting
4031 strategy :
@@ -44,67 +35,35 @@ jobs:
4435 python-version : [ "3.8", "3.9", "3.10", "3.11" ]
4536 runs-on : ${{ matrix.os }}
4637 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
5540 with :
5641 python-version : ${{ matrix.python-version }}
57- # ----------------------------------------------
58- # ----- install distutils if needed -----
59- # ----------------------------------------------
6042 - name : Install distutils on Ubuntu
6143 if : matrix.os == 'ubuntu-latest'
6244 run : |
6345 sudo add-apt-repository ppa:deadsnakes/ppa
6446 sudo apt-get update
6547 sudo apt install python${{ matrix.python-version }}-distutils
66- # ----------------------------------------------
67- # ----- install & configure poetry -----
68- # ----------------------------------------------
6948 - name : Install Poetry
7049 uses : snok/install-poetry@v1
7150 with :
7251 virtualenvs-create : true
7352 virtualenvs-in-project : true
74- # ----------------------------------------------
75- # load cached venv if cache exists
76- # ----------------------------------------------
7753 - name : Load cached venv
7854 id : cached-poetry-dependencies
7955 uses : actions/cache@v3
8056 with :
8157 path : .venv
8258 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
8760 if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
8861 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
9464 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'
9967 - name : Run tests
10068 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