Skip to content

Commit

Permalink
made tests to run on windows too (#229)
Browse files Browse the repository at this point in the history
* added_windows

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* no_rev

* fix

* fix

* fix

* fix

* v0

* v0

* v0

* v0

* v0

* v0

* v0

Co-authored-by: Jonthan Liberman <jonthanliberman@ip-192-168-1-16.eu-west-1.compute.internal>
Co-authored-by: Jonthan Liberman <jonthanliberman@ip-192-168-1-143.eu-west-1.compute.internal>
Co-authored-by: Jonthan Liberman <jonthanliberman@Jonthans-MacBook-Pro.local>
Co-authored-by: Jonthan Liberman <jonthanliberman@ip-192-168-1-23.eu-west-1.compute.internal>
  • Loading branch information
5 people committed Dec 19, 2021
1 parent bb91727 commit 59c3603
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 23 deletions.
52 changes: 34 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,21 @@ jobs:
- name: Run Tests
run: make test

#
# documentation-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: '14.x'
# - name: Test Build
# run: |
# make website
# cd docs/_website
# if [ -e package-lock.json ]; then
# npm ci
# else
# npm i
# fi
# npm run build
tests-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.8"] #TODO: add 3.10 when scikit-learn have a wheel https://github.com/scikit-learn/scikit-learn/pull/21232

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Tests
run: make test-win


dependencies-license-check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,3 +80,22 @@ jobs:
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"


# documentation-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: '14.x'
# - name: Test Build
# run: |
# make website
# cd docs/_website
# if [ -e package-lock.json ]; then
# npm ci
# else
# npm i
# fi
# npm run build
20 changes: 15 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,18 @@ REQUIRE = requirements.txt
ext_py := $(shell which python3 || which python)

# Override by putting in commandline python=XXX when needed.
python = $(shell echo ${ext_py} | rev | cut -d '/' -f 1 | rev)
python = $(shell basename `echo ${ext_py}`)
TESTDIR = tests
ENV = venv
repo = pypi

# System Envs
BIN := $(ENV)/bin
pythonpath= PYTHONPATH=.
pythonpath = PYTHONPATH=.

# Venv Executables
PIP := $(BIN)/pip
PIP_WIN := python -m pip
PYTHON := $(BIN)/$(python)
ANALIZE := $(BIN)/pylint
COVERAGE := $(BIN)/coverage
Expand Down Expand Up @@ -97,16 +98,15 @@ env: $(REQUIREMENTS_LOG)
$(PIP):
$(info #### Remember to source new environment [ $(ENV) ] ####)
@echo "external python_exe is $(ext_py)"
test -d $(ENV) || $(ext_py) -m venv $(ENV)
test -d $(ENV) || $(ext_py) -m venv $(ENV)
$(REQUIREMENTS_LOG): $(PIP) $(REQUIREMENTS)
$(PIP) install --upgrade pip
$(ext_py) -m pip install --upgrade pip
$(PIP) install $(INSTALLATION_PKGS)
for f in $(REQUIREMENTS); do \
$(PIP) install -r $$f | tee -a $(REQUIREMENTS_LOG); \
done



### Static Analysis ######################################################

.PHONY: validate pylint docstring
Expand All @@ -130,6 +130,16 @@ test: $(REQUIREMENTS_LOG) $(TEST_RUNNER)
$(pythonpath) $(TEST_RUNNER) $(args) $(TESTDIR)


test-win:
test -d $(ENV) || python -m venv $(ENV)
$(ENV)\Scripts\activate.bat
$(PIP_WIN) $(INSTALLATION_PKGS)
for f in $(REQUIRE); do \
$(PIP_WIN) install -r $$f | tee -a $(REQUIREMENTS_LOG); \
done
$(PIP_WIN) install $(TEST_RUNNER_PKGS)
python -m pytest $(TESTDIR)

notebook: $(REQUIREMENTS_LOG) $(TEST_RUNNER)
# if deepchecks is not installed, we need to install it for testing porpuses,
# as the only time you'll need to run make is in dev mode, we're installing
Expand Down

0 comments on commit 59c3603

Please sign in to comment.