Skip to content

Commit

Permalink
chore: add pytest as dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardocarvp authored and Optimox committed Dec 27, 2021
1 parent ddf02da commit 95e0e9a
Show file tree
Hide file tree
Showing 5 changed files with 849 additions and 478 deletions.
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,20 @@ jobs:
paths:
- /work/.cache/poetry
key: v1-dependencies-{{ checksum "poetry.lock" }}
unit-tests:
executor: python-executor
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "poetry.lock" }}
- install_poetry
- run:
name: run unit-tests
shell: bash -leo pipefail
command: |
make unit-tests
test-nb-census:
executor: python-executor
steps:
Expand Down Expand Up @@ -200,6 +214,9 @@ workflows:
- test-build-docker
- test-build-docker-gpu
- install
- unit-tests:
requires:
- install
- test-nb-census:
requires:
- install
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# set default shell
SHELL := $(shell which bash)
FOLDER=$$(pwd)
# for Windows users
# FOLDER=$(CURDIR)
# default shell options
.SHELLFLAGS = -c
NO_COLOR=\\e[39m
Expand Down Expand Up @@ -107,6 +109,10 @@ test-nb-pretraining: ## run customization example tests using notebooks
$(MAKE) _run_notebook NB_FILE="./pretraining_example.ipynb"
.PHONY: test-nb-pretraining

unit-tests: ## run all unitary tests
poetry run pytest -s tests/
.PHONY: unit-tests

help: ## Display help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help
Expand Down
Loading

0 comments on commit 95e0e9a

Please sign in to comment.