Skip to content
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
72 changes: 72 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: RedBeat CI

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

env:
PIP_DISABLE_PIP_VERSION_CHECK: '1'
PIP_NO_PYTHON_VERSION_WARNING: '1'

defaults:
run:
shell: bash

jobs:
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-latest] #, windows-latest] tests fail on windows
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- name: Check out source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements-dev.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt

- name: Run unittests
run: make unittests

lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: pip
cache-dependency-path: requirements-dev.txt

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-black flake8-isort

- name: Run flake8
run: flake8 --count --statistics redbeat tests
97 changes: 29 additions & 68 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push
on:
push:
branches:
- main
tags:
- 'v*'
workflow_dispatch:

permissions:
contents: read

env:
PIP_DISABLE_PIP_VERSION_CHECK: '1'
PIP_NO_PYTHON_VERSION_WARNING: '1'

defaults:
run:
shell: bash

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v4
Expand All @@ -14,50 +32,29 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
python-version: '3.12'
cache: pip
- name: Install build tooling
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build a binary wheel and a source tarball
run: python3 -m build
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/celery-redbeat
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
- build
runs-on: ubuntu-latest
timeout-minutes: 10
if: startsWith(github.ref, 'refs/tags/')

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
Expand Down Expand Up @@ -93,39 +90,3 @@ jobs:
gh release upload
"$GITHUB_REF_NAME" dist/**
--repo "$GITHUB_REPOSITORY"

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/celery-redbeat

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Check out source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install build tool
run: python3 -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python3 -m build

- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
repository-url: https://test.pypi.org/legacy/
55 changes: 0 additions & 55 deletions .github/workflows/pythonapp.yml

This file was deleted.

6 changes: 5 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
2.3.3 (unreleased)
2.3.3dev (unreleased)
---------------------
- Drop support for Python 3.8 and add CI coverage through Python 3.13.

2.3.3 (2025-07-02)
---------------------
- add Python 3.12 support, thanks @AnkiHubSoftware
- bugfix, update RedBeatSchedulerEntry definitions for improved type safety and correctness, thanks @sotosapp
Expand Down
3 changes: 1 addition & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ flake8-black
flake8-isort

# Testing
# Pin fakeredis to <2.27.0 because newer versions do not support Python 3.8
fakeredis>=1.0.3,<2.27.0
fakeredis>=2.27.0

pbr
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,22 @@ classifiers=
Topic :: Software Development :: Object Brokering
Programming Language :: Python
Programming Language :: Python :: 3
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
Programming Language :: Python :: 3.13
Programming Language :: Python :: Implementation :: CPython
Operating System :: OS Independent

[options]
packages = redbeat
python_requires = >=3.8
python_requires = >=3.9
install_requires =
redis>=3.2
celery>=5.0
python-dateutil
tenacity
backports.zoneinfo>=0.2.1; python_version < "3.9.0"
setup_requires =
pbr

Expand Down