mirror of
https://github.com/long2ice/fastapi-cache.git
synced 2026-03-25 04:57:54 +00:00
update workflows
This commit is contained in:
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -8,9 +8,8 @@ jobs:
|
|||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
- name: Install and configure Poetry
|
- uses: abatilo/actions-poetry@v2.1.3
|
||||||
uses: snok/install-poetry@v1.1.1
|
- name: Config poetry
|
||||||
with:
|
run: poetry config experimental.new-installer false
|
||||||
virtualenvs-create: false
|
|
||||||
- name: CI
|
- name: CI
|
||||||
run: make ci
|
run: make ci
|
||||||
|
|||||||
7
.github/workflows/pypi.yml
vendored
7
.github/workflows/pypi.yml
vendored
@@ -11,10 +11,9 @@ jobs:
|
|||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: '3.x'
|
||||||
- name: Install and configure Poetry
|
- uses: abatilo/actions-poetry@v2.1.3
|
||||||
uses: snok/install-poetry@v1.1.1
|
- name: Config poetry
|
||||||
with:
|
run: poetry config experimental.new-installer false
|
||||||
virtualenvs-create: false
|
|
||||||
- name: Build dists
|
- name: Build dists
|
||||||
run: make build
|
run: make build
|
||||||
- name: Pypi Publish
|
- name: Pypi Publish
|
||||||
|
|||||||
25
Makefile
25
Makefile
@@ -1,19 +1,6 @@
|
|||||||
checkfiles = fastapi_cache/ examples/ tests/
|
checkfiles = fastapi_cache/ examples/ tests/
|
||||||
black_opts = -l 100 -t py38
|
|
||||||
py_warn = PYTHONDEVMODE=1
|
py_warn = PYTHONDEVMODE=1
|
||||||
|
|
||||||
help:
|
|
||||||
@echo "FastAPI-Cache development makefile"
|
|
||||||
@echo
|
|
||||||
@echo "usage: make <target>"
|
|
||||||
@echo "Targets:"
|
|
||||||
@echo " up Ensure dev/test dependencies are updated"
|
|
||||||
@echo " deps Ensure dev/test dependencies are installed"
|
|
||||||
@echo " check Checks that build is sane"
|
|
||||||
@echo " test Runs all tests"
|
|
||||||
@echo " style Auto-formats the code"
|
|
||||||
@echo " build Build package"
|
|
||||||
|
|
||||||
up:
|
up:
|
||||||
@poetry update
|
@poetry update
|
||||||
|
|
||||||
@@ -21,16 +8,16 @@ deps:
|
|||||||
@poetry install --no-root -E all
|
@poetry install --no-root -E all
|
||||||
|
|
||||||
style: deps
|
style: deps
|
||||||
@isort -src $(checkfiles)
|
@poetry run isort -src $(checkfiles)
|
||||||
@black $(black_opts) $(checkfiles)
|
@poetry run black $(checkfiles)
|
||||||
|
|
||||||
check: deps
|
check: deps
|
||||||
@black --check $(black_opts) $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
|
@poetry run black $(checkfiles) || (echo "Please run 'make style' to auto-fix style issues" && false)
|
||||||
@flake8 $(checkfiles)
|
@poetry run flake8 $(checkfiles)
|
||||||
@bandit -r $(checkfiles)
|
@poetry run bandit -r $(checkfiles)
|
||||||
|
|
||||||
test: deps
|
test: deps
|
||||||
$(py_warn) pytest
|
$(py_warn) poetry run pytest
|
||||||
|
|
||||||
build: clean deps
|
build: clean deps
|
||||||
@poetry build
|
@poetry build
|
||||||
|
|||||||
@@ -37,3 +37,7 @@ build-backend = "poetry.masonry.api"
|
|||||||
redis = ["aioredis"]
|
redis = ["aioredis"]
|
||||||
memcache = ["aiomcache"]
|
memcache = ["aiomcache"]
|
||||||
all = ["aioredis","aiomcache"]
|
all = ["aioredis","aiomcache"]
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
line-length = 100
|
||||||
|
target-version = ['py36', 'py37', 'py38', 'py39']
|
||||||
|
|||||||
Reference in New Issue
Block a user