Skip to content

Commit

Permalink
makefile and gh test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
enzbus committed Sep 2, 2023
1 parent c9446a4 commit 66d88ba
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Setup environment
run: python -m venv env
# - name: Setup environment
# run: python -m venv env

# - name: Old versions for py 3.10
# if: ${{ matrix.python-version == '3.10'}}
# run: env/bin/python -m pip install cvxpy==1.2.3

- name: Install other dependencies
- name: Install package
run: |
env/bin/python -m pip install .
env/bin/python -m pip install coverage
pip install .
pip install coverage
- name: Run tests
- name: Run tests with coverage
run: |
env/bin/coverage run -m unittest cvxportfolio/tests/*.py
env/bin/coverage lcov
coverage run -m unittest cvxportfolio/tests/*.py
coverage lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ endif

env:
$(PYTHON) -m venv $(ENVDIR)
$(BINDIR)/python -m pip install -r requirements.txt
$(BINDIR)/python -m pip install --editable .
$(BINDIR)/python -m pip install -r requirements.txt

test:
$(BINDIR)/python -m unittest $(PROJECT)/tests/*.py
$(BINDIR)/pytest $(PROJECT)/tests/*.py

hardtest: cleanenv env test

test8:
flake8 --per-file-ignores='$(PROJECT)/__init__.py:F401,F403' $(PROJECT)/*.py
Expand All @@ -35,7 +37,7 @@ pep8:
# use autopep8 to make innocuous fixes
$(BINDIR)/autopep8 -i $(PROJECT)/*.py $(PROJECT)/tests/*.py

release: test
release: hardtest
$(BINDIR)/python bumpversion.py
git push
$(BINDIR)/python -m build
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ coverage
multiprocess
flake8
autopep8
sphinx-rtd-theme
sphinx-rtd-theme
pytest

0 comments on commit 66d88ba

Please sign in to comment.