-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable auto deploying and make tests work with latest git.
- Loading branch information
Showing
9 changed files
with
162 additions
and
37 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,76 @@ | ||
--- | ||
name: Test & Deploy | ||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
tags: | ||
- "*.*.*" | ||
pull_request: | ||
|
||
jobs: | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Run lint | ||
run: tox -e lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [3.7, 3.8, 3.9, "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip | ||
pip install -U setuptools | ||
sudo apt update | ||
sudo apt install -y build-essential libpq-dev python-dev-is-python3 | ||
- name: Install tox | ||
run: pip install tox | ||
- name: Allow git to submodule filesystem and set identity | ||
run: | | ||
git config --global protocol.file.allow always | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Test User" | ||
- name: Run tox | ||
# Run tox using the version of Python in `PATH` | ||
run: tox -e py | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [lint, test] | ||
if: startsWith(github.ref, 'refs/tags') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
pip install -U pip | ||
pip install -U wheel setuptools | ||
- name: Build package | ||
run: python setup.py sdist bdist_wheel | ||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_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 |
---|---|---|
@@ -1,11 +1,32 @@ | ||
*.pyc | ||
*~ | ||
### Python ### | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
-*~ | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.eggs/ | ||
*.egg-info/ | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
MANIFEST | ||
# mypy | ||
.mypy_cache/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
.mypy_cache | ||
.pytest_cache | ||
|
||
.venv | ||
pyrightconfig.json |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# file GENERATED by distutils, do NOT edit | ||
LICENSE | ||
README.rst | ||
setup.py | ||
bin/git-trunk | ||
git_trunk/__init__.py | ||
git_trunk/git_trunk_base.py | ||
git_trunk/git_trunk_commands.py | ||
git_trunk/git_trunk_config.py | ||
git_trunk/version.py |
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 |
---|---|---|
@@ -1 +0,0 @@ | ||
__version__ = '0.5.0' | ||
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 |
---|---|---|
@@ -1,25 +1,35 @@ | ||
from distutils.core import setup | ||
from git_trunk import __version__ | ||
from setuptools import setup, find_packages | ||
|
||
test_deps = ["pytest"] | ||
extras = {'test': test_deps} | ||
|
||
setup( | ||
name='git_trunk', | ||
version=__version__, | ||
packages=['git_trunk'], | ||
use_scm_version=True, | ||
packages=find_packages(), | ||
license='LGPLv3', | ||
url='https://github.com/focusate/git-trunk', | ||
description="Git Trunk based workflow", | ||
long_description=open('README.rst').read(), | ||
install_requires=['footil>=0.24.0', 'gitpython'], | ||
tests_require=test_deps, | ||
extras_require=extras, | ||
setup_requires=[ | ||
'setuptools_scm', | ||
], | ||
scripts=['bin/git-trunk'], | ||
maintainer='Andrius Laukavičius', | ||
maintainer_email='[email protected]', | ||
maintainer_email='[email protected]', | ||
python_requires='>=3.5', | ||
classifiers=[ | ||
'Environment :: Other Environment', | ||
'Intended Audience :: Developers', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Programming Language :: Python :: 3.11', | ||
'Programming Language :: Python :: 3.12', | ||
'Topic :: Software Development', | ||
'Topic :: Utilities', | ||
], | ||
|
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 @@ | ||
[tox] | ||
envlist = py37,py38,py39,py310,py311,py312,lint | ||
|
||
[testenv] | ||
extras = test | ||
commands = py.test {posargs} | ||
|
||
[testenv:lint] | ||
basepython = python3.10 | ||
skip_install=true | ||
deps = flake8 | ||
commands = flake8 {posargs} git_trunk/ git_trunk/tests/ | ||
|
||
[pytest] | ||
addopts = -q | ||
norecursedirs = *.egg .git .* _* |