Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Maintenance updates. Modernize sandbox tooling, CI recipe, and list of dependencies #568

Merged
merged 5 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 6 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
Expand All @@ -30,35 +23,24 @@ jobs:
steps:

- name: Acquire sources
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'pip'
cache-dependency-path: 'setup.py'

- uses: actions/cache@v2
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Run tests
- name: Run tests, with coverage report
run: |
pip install .[test]
pytest tests

- name: Generate coverage report
if: matrix.python-version == '3.9'
run: |
pytest --cov=mqttwarn tests
coverage xml

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9'
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
flags: unittests
Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ format: install-releasetools
# Release this piece of software
# Synopsis:
# make release bump=minor (major,minor,patch)
release: bumpversion push sdist pypi-upload
release: bumpversion push build pypi-upload


# -------------
Expand All @@ -84,20 +84,19 @@ bumpversion: install-releasetools
push:
git push && git push --tags

sdist:
@$(python) setup.py sdist
build: install-releasetools
@$(python) -m build

pypi-upload: install-releasetools
@$(twine) upload --skip-existing dist/*.tar.gz

install-doctools: setup-virtualenv
@$(pip) install --quiet --requirement requirements-docs.txt --upgrade
@$(pip) install --requirement requirements-docs.txt --upgrade

install-releasetools: setup-virtualenv
@$(pip) install --quiet --requirement requirements-release.txt --upgrade
@$(pip) install --requirement requirements-release.txt --upgrade

install-tests: setup-virtualenv
@$(pip) install --quiet --editable .[test] --upgrade
@$(python) setup.py --quiet develop
@$(pip) install --editable=.[test] --upgrade
@touch $(venvpath)/bin/activate
@mkdir -p .pytest_results
11 changes: 6 additions & 5 deletions requirements-release.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
bump2version==1.0.0
twine>=3.2,<4
keyring>=21.4,<24
isort>=5,<6
black>=20,<22
build
bump2version
twine
keyring
isort
black
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
README = open(os.path.join(here, 'README.rst')).read()

requires = [
'six>=1.13.0',
'paho-mqtt>=1.4.0',
'jinja2>=2.10.1',
'attrs>=19.3.0',
'docopt>=0.6.2',
'requests>=2.22.0',
'future>=0.18.2',
'configparser>=3.5.3',
'six<2',
'paho-mqtt<2',
'jinja2<3',
'attrs<23',
'docopt<1',
'requests<3',
'future<1',
'configparser<4',
]

extras = {
Expand Down