-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
452 additions
and
99 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[flake8] | ||
|
||
# Ignore line too long error | ||
ignore = E501 | ||
|
||
exclude = | ||
.git, | ||
__pycache__, | ||
build, | ||
dist, | ||
|
||
per-file-ignores = | ||
|
||
# allow top level module exposing | ||
__init__.py:F401 | ||
test/__init__.py:F401 |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CI Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
make install_pipenv PIPENV_PYTHON_VERSION=${{ matrix.python-version }} | ||
- name: Lint | ||
run: make lint | ||
- name: Test | ||
run: make test |
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,20 +1,44 @@ | ||
PIPENV_PYTHON_VERSION ?= 3.6 | ||
|
||
|
||
.PHONY: all | ||
all: | ||
$(error please pick a target) | ||
|
||
.PHONY: upload | ||
upload: clean | ||
python setup.py sdist bdist_wheel | ||
pipenv run upload | ||
upload: clean build lint test | ||
python -m pipenv run upload | ||
|
||
.PHONY: build | ||
build: | ||
python -m pipenv run build | ||
|
||
.PHONE: clean | ||
.PHONY: clean | ||
clean: | ||
rm -rf dist | ||
rm -rf dist build nuclio_sdk.egg-info | ||
|
||
.PHONY: clean_pyc | ||
clean_pyc: | ||
find . -name '*.pyc' -exec rm {} \; | ||
|
||
.PHONY: flake8 | ||
flake8: | ||
pipenv run flake8 | ||
python -m pipenv run flake8 | ||
|
||
.PHONY: test | ||
test: | ||
python -m pipenv run test | ||
|
||
.PHONY: lint | ||
lint: | ||
python -m pipenv run lint | ||
|
||
.PHONY: install_pipenv | ||
install_pipenv: | ||
python -m pip install --user pipenv | ||
python -m pipenv --python ${PIPENV_PYTHON_VERSION} | ||
ifeq ($(PIPENV_PYTHON_VERSION), 2.7) | ||
python -m pipenv install -r requirements.py2.txt | ||
else | ||
python -m pipenv install --dev | ||
endif |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2017 The Nuclio Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import sys | ||
|
||
PYTHON3 = sys.version_info[0] == 3 | ||
PYTHON2 = sys.version_info[0] == 2 |
Oops, something went wrong.