-
Notifications
You must be signed in to change notification settings - Fork 0
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
12 changed files
with
175 additions
and
95 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,5 +1,5 @@ | ||
[flake8] | ||
ignore = RST303,RST304,W503 | ||
ignore = W503 | ||
omit = | ||
dist | ||
per-file-ignores = | ||
|
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,87 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
tags: [ 'v*' ] | ||
|
||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
name: Pytest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.10', '3.11', '3.12'] | ||
env: | ||
PREFIX: /usr | ||
FLAKE8: flake8 | ||
PYTEST: pytest | ||
COVERAGE: coverage | ||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
git clone https://github.com/pylover/python-makelib.git make | ||
make env ENV=ci | ||
sudo cp `which bddcli-bootstrapper` /usr/local/bin | ||
- name: Lint | ||
run: make lint | ||
- name: Test | ||
run: make cover | ||
- name: Coveralls | ||
run: coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
|
||
coveralls-finish: | ||
name: Coveralls finish | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
- name: Install dependencies | ||
run: python -m pip install coveralls | ||
- name: Coveralls Finished | ||
run: coveralls --finish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
|
||
release: | ||
name: Github Release | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false |
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,28 @@ | ||
name: Deploy | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploypypi: | ||
name: Deploy to PyPI | ||
runs-on: ubuntu-latest | ||
env: | ||
PREFIX: /usr | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
- name: Install dependencies | ||
run: | | ||
git clone https://github.com/pylover/python-makelib.git make | ||
make env ENV=ci | ||
- name: Create distributions | ||
run: make dist | ||
- name: Publish a Python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1.9 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
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,3 @@ | ||
[submodule "make"] | ||
path = make | ||
url = [email protected]:pylover/python-makelib.git |
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,58 +1,6 @@ | ||
PY = python3 | ||
PIP = pip3 | ||
TEST_DIR = tests | ||
PRJ = yhttp.ext.sqlalchemy | ||
PYTEST_FLAGS = -v | ||
HERE = $(shell readlink -f `dirname .`) | ||
VENVNAME = $(shell basename $(HERE) | cut -d'-' -f1) | ||
VENV = $(HOME)/.virtualenvs/$(VENVNAME) | ||
|
||
|
||
.PHONY: test | ||
test: | ||
pytest $(PYTEST_FLAGS) $(TEST_DIR) | ||
|
||
|
||
.PHONY: cover | ||
cover: | ||
pytest $(PYTEST_FLAGS) --cov=$(PRJ) $(TEST_DIR) | ||
|
||
|
||
.PHONY: lint | ||
lint: | ||
flake8 | ||
|
||
|
||
.PHONY: venv | ||
venv: | ||
python3 -m venv $(VENV) | ||
|
||
|
||
.PHONY: env | ||
env: | ||
$(PIP) install -r requirements-dev.txt | ||
$(PIP) install -e . | ||
|
||
|
||
.PHONY: sdist | ||
sdist: | ||
$(PY) setup.py sdist | ||
|
||
|
||
.PHONY: bdist | ||
bdist: | ||
$(PY) setup.py bdist_egg | ||
|
||
|
||
.PHONY: dist | ||
dist: sdist bdist | ||
|
||
|
||
.PHONY: pypi | ||
pypi: dist | ||
twine upload dist/*.gz dist/*.egg | ||
|
||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf build/* | ||
PKG = yhttp.ext.sqlalchemy | ||
PKG_NAME = yhttp-sqlalchemy | ||
include make/common.mk | ||
include make/test.mk | ||
include make/sphinx.mk | ||
include make/pypi.mk |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
bddrest >= 3.0.2, < 4 | ||
bddrest >= 4, < 5 | ||
bddcli >= 2.5.1, < 3 | ||
coverage < 6 | ||
coveralls | ||
pytest >= 4.4.0 | ||
pytest-cov | ||
flake8 | ||
git+https://github.com/yhttp/yhttp-devutils.git#v1.1.0 | ||
yhttp-dev >= 3.1.1 |
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
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