Skip to content

Commit

Permalink
Merge pull request #54 from jelmer/github
Browse files Browse the repository at this point in the history
Bump Python to 3.8, add github metadata
jelmer authored May 13, 2024
2 parents 4600957 + 01c47db commit 58ffb81
Showing 5 changed files with 97 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: jelmer
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -12,3 +12,7 @@ updates:
directory: "/"
schedule:
interval: weekly
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: weekly
7 changes: 3 additions & 4 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
exclude:
# There is no pyyaml wheel on macos-latest/3.9
- os: macos-latest
@@ -24,11 +24,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pyasn1 aiohttp
python setup.py develop
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Style checks
run: |
python -m pip install ruff
python -m ruff check .
- name: Typing checks
run: |
85 changes: 85 additions & 0 deletions .github/workflows/wheels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Build Python distributions

on:
push:
pull_request:
schedule:
- cron: "0 6 * * *" # Daily 6AM UTC build

jobs:
build-wheels:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: true

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build wheels
run: python -m build --wheel
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl

build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build sdist
run: python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz

test-sdist:
needs:
- build-sdist
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install twine
- name: Download sdist
uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Test sdist
run: twine check dist/*
- name: Test installation from sdist
run: pip install dist/*.tar.gz

publish:
runs-on: ubuntu-latest
needs:
- build-wheels
- build-sdist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/p/prometheus-xmpp-alerts
steps:
- name: Download distributions
uses: actions/download-artifact@v2
with:
name: artifact
path: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -11,15 +11,16 @@ keywords = ["prometheus xmpp jabber"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"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",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Version Control",
]
requires-python = ">= 3.7"
requires-python = ">= 3.8"
dependencies = [
"slixmpp",
"aiohttp",
@@ -42,6 +43,7 @@ prometheus-xmpp-alerts = "prometheus_xmpp.__main__:main"

[project.optional-dependencies]
testing = ["pytz"]
dev = ["ruff==0.4.4"]

[tool.setuptools]
packages = ["prometheus_xmpp"]

0 comments on commit 58ffb81

Please sign in to comment.