diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2abd4f7..44b14d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,9 @@ name: build -on: [ push ] +on: + push: + pull_request: + workflow_dispatch: jobs: build: diff --git a/Makefile b/Makefile index 2f5501c..500a6d8 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,25 @@ +PYTHON ?= python3 all: - python setup.py sdist - python -m doctest ./customerio/__init__.py + $(PYTHON) setup.py sdist + $(PYTHON) -m doctest ./customerio/__init__.py install: - python setup.py install + $(PYTHON) setup.py install clean: - python setup.py clean + $(PYTHON) setup.py clean rm -rf MANIFEST build dist dev: clean all if ! pip uninstall customerio; then echo "customerio not installed, installing it for the first time" ; fi pip install dist/* - python -i -c "from customerio import *" + $(PYTHON) -i -c "from customerio import *" upload: - python setup.py register + $(PYTHON) setup.py register echo "*** Now upload the binary to PyPi *** (one second)" && sleep 3 && open dist & open "http://pypi.python.org/pypi?%3Aaction=pkg_edit&name=customerio" # python setup.py upload test: openssl req -new -newkey rsa:2048 -days 10 -nodes -x509 -subj "/C=CA/ST=Ontario/L=Toronto/O=Test/CN=127.0.0.1" -keyout ./tests/server.pem -out ./tests/server.pem - python -m unittest discover -v + $(PYTHON) -m unittest discover -v