Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows Tests #17

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
run: pip install rundoc .
run: pip install invoke rundoc .
- name: make test-readme
run: make test-readme

Expand All @@ -46,15 +46,15 @@ jobs:
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
run: pip install .[test]
run: pip install invoke .[test]
- name: make test-unit
run: make test-unit

Expand All @@ -63,14 +63,14 @@ jobs:
strategy:
matrix:
python-version: [3.7, 3.8]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install package and dependencies
run: pip install .[test]
run: pip install invoke .[test]
- name: make test-tutorials
run: make test-tutorials
15 changes: 4 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ install-develop: clean-build clean-pyc ## install the package in editable mode a

.PHONY: lint
lint: ## check style with flake8 and isort
flake8 zephyr_ml tests
isort -c --recursive zephyr_ml tests
invoke lint

.PHONY: fix-lint
fix-lint: ## fix lint issues using autoflake, autopep8, and isort
Expand All @@ -97,21 +96,15 @@ fix-lint: ## fix lint issues using autoflake, autopep8, and isort

.PHONY: test-unit
test-unit: ## run tests quickly with the default Python
python -m pytest --cov=zephyr_ml
invoke pytest

.PHONY: test-readme
test-readme: ## run the readme snippets
rm -rf tests/readme_test && mkdir -p tests/readme_test/notebooks
cp -r notebooks/data tests/readme_test/notebooks/
cd tests/readme_test && rundoc run --single-session python3 -t python3 ../../README.md
rm -rf tests/readme_test

invoke readme

.PHONY: test-tutorials
test-tutorials: ## run the tutorial notebooks
find notebooks -path "*/.ipynb_checkpoints" -prune -false -o -name "*.ipynb" -exec \
jupyter nbconvert --execute --ExecutePreprocessor.timeout=3600 --to=html --stdout {} > /dev/null \;

invoke tutorials

.PHONY: test
test: test-unit test-readme test-tutorials ## test everything that needs test dependencies
Expand Down
Loading
Loading