1 Star 0 Fork 0

stoneqp/tartiflette-aiohttp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 2.73 KB
一键复制 编辑 原始数据 按行查看 历史
Aurelien Busi 提交于 2020-09-21 09:52 . Update QA tools
SET_ALPHA_VERSION = 0
PKG_VERSION := $(shell cat setup.py | grep "_VERSION =" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+(rc[0-9]+)?')
REF := $(shell cat /github/workflow/event.json | jq ".ref")
ifneq ($(REF),"refs/heads/master")
PKG_VERSION := $(shell echo | awk -v pkg_version="$(PKG_VERSION)" -v build_number="$(shell date +\"%s\")" '{print pkg_version "dev" build_number}')
SET_ALPHA_VERSION = 1
endif
PATH_TO_MAKEFILE := /github/workspace/Makefile
ifneq ("$(wildcard $(PATH_TO_MAKEFILE))","")
IN_GITHUB_ACTION := 1
else
IN_GITHUB_ACTION := 0
endif
.PHONY: init
init:
true
.PHONY: format-import
format-import:
isort --profile black tartiflette_aiohttp/. tests/. setup.py
.PHONY: format
format: format-import
black -l 79 --target-version py36 tartiflette_aiohttp setup.py tests
.PHONY: check-import
check-import:
isort --check-only --profile black tartiflette_aiohttp/. tests/. setup.py
.PHONY: check-format
check-format:
black -l 79 --target-version py36 --check tartiflette_aiohttp setup.py tests
.PHONY: style
style: check-format check-import
pylint tartiflette_aiohttp --rcfile=pylintrc
ifeq ($(IN_GITHUB_ACTION),1)
make clean
endif
.PHONY: test-integration
test-integration: clean
mkdir -p reports
py.test -s tests/integration --junitxml=reports/report_integ_tests.xml --cov . --cov-config .coveragerc --cov-report term-missing --cov-report xml:reports/coverage_integ.xml
ifeq ($(IN_GITHUB_ACTION),1)
make clean
endif
.PHONY: test-unit
test-unit: clean
mkdir -p reports
py.test -s tests/unit --junitxml=reports/report_unit_tests.xml --cov . --cov-config .coveragerc --cov-report term-missing --cov-report xml:reports/coverage_unit.xml
ifeq ($(IN_GITHUB_ACTION),1)
make clean
endif
.PHONY: test-functional
test-functional: clean
mkdir -p reports
py.test -s tests/functional --junitxml=reports/report_func_tests.xml --cov . --cov-config .coveragerc --cov-report term-missing --cov-report xml:reports/coverage_func.xml
ifeq ($(IN_GITHUB_ACTION),1)
make clean
endif
.PHONY: test
test: test-integration test-unit test-functional
.PHONY: clean
clean:
find . -name '*.pyc' -exec rm -fv {} +
find . -name '*.pyo' -exec rm -fv {} +
find . -name '__pycache__' -exec rm -frv {} +
.PHONY: set-version
set-version:
ifneq ($(SET_ALPHA_VERSION), 0)
bash -c "sed -i \"s@_VERSION[ ]*=[ ]*[\\\"\'][0-9]\+\\.[0-9]\+\\.[0-9]\+\(rc[0-9]\+\)\?[\\\"\'].*@_VERSION = \\\"$(PKG_VERSION)\\\"@\" setup.py"
endif
.PHONY: get-version
get-version:
@echo $(PKG_VERSION)
.PHONY: get-last-released-changelog-entry
get-last-released-changelog-entry:
@cat changelogs/$(PKG_VERSION).md
.PHONY: github-action-version-and-changelog
github-action-version-and-changelog:
echo $(PKG_VERSION) > $(HOME)/name
echo $(PKG_VERSION) > $(HOME)/tag
@cp changelogs/$(PKG_VERSION).md $(HOME)/changelog
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/stoneqp/tartiflette-aiohttp.git
git@gitee.com:stoneqp/tartiflette-aiohttp.git
stoneqp
tartiflette-aiohttp
tartiflette-aiohttp
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385