-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add setuputil based test running and makefile support
Signed-off-by: Harsha Narayana <[email protected]>
- Loading branch information
1 parent
3470fa4
commit 9eedfbc
Showing
3 changed files
with
72 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,14 @@ | ||
# Non Code related contents | ||
include LICENSE *.rst *.md *.yml *.toml Makefile *.cfg | ||
graft .github | ||
include LICENSE | ||
include README.rst | ||
|
||
# Release | ||
include release.py | ||
# Setup | ||
include setup.py | ||
|
||
# Requirements | ||
include *.txt | ||
include Makefile | ||
|
||
# Tests | ||
include tox.ini .coveragerc | ||
include .coveragerc | ||
graft tests | ||
|
||
# Examples | ||
graft examples | ||
|
||
# Documentation | ||
graft docs | ||
prune docs/_build | ||
|
||
# Docker setup | ||
graft docker | ||
|
||
global-exclude __pycache__ | ||
global-exclude *.py[co] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,34 @@ | ||
test: | ||
find . -name "*.pyc" -delete | ||
.PHONY: help test test-coverage install docker-test | ||
|
||
.DEFAULT: help | ||
|
||
help: | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@echo "test" | ||
@echo " Run Sanic Unit Tests" | ||
@echo "test-coverage" | ||
@echo " Run Sanic Unit Tests with Coverage" | ||
@echo "install" | ||
@echo " Install Sanic" | ||
@echo "docker-test" | ||
@echo " Run Sanic Unit Tests using Docker" | ||
@echo "" | ||
|
||
clean: | ||
find . ! -path "./.eggs/*" -name "*.pyc" -exec rm {} \; | ||
find . ! -path "./.eggs/*" -name "*.pyo" -exec rm {} \; | ||
rm -rf build/* > /dev/null 2>&1 | ||
rm -rf dist/* > /dev/null 2>&1 | ||
|
||
test: clean | ||
python setup.py test | ||
|
||
test-coverage: clean | ||
python setup.py test --pytest-args="--cov sanic --cov-report term --cov-append " | ||
|
||
install: | ||
python setup.py install | ||
|
||
docker-test: clean | ||
docker build -t sanic/test-image -f docker/Dockerfile . | ||
docker run -t sanic/test-image tox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters