Skip to content

Commit

Permalink
Keep GitHub Actions up to date with GitHub's Dependabot (#1383)
Browse files Browse the repository at this point in the history
* Keep GitHub Actions up to date with GitHub's Dependabot

Automates the process of creating pull requests like:
* #1147
* #1292

---

* [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)
* [Configuration options for the dependabot.yml file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem)

* celery-version: ['5.2.x', '5.3.x']

* celery-version: ['5.2.x', '5.3.x']

* celery-version: ['5.2.*', '5.3.*']

* Modern pip has a real dependency resolver

* Fix yield-in-for-loop

* requirements/dev.txt imports default and test

* Celery 5.2 does not support Python 3.12

* celery-version: ['5.2.*', '5.3.*', '5.4.*']
  • Loading branch information
cclauss authored Sep 1, 2024
1 parent 58136bf commit 652ce08
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Keep GitHub Actions up to date with GitHub's Dependabot...
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem
version: 2
updates:
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*" # Group all Actions updates into a single larger pull request
schedule:
interval: weekly
20 changes: 11 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,33 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
celery-version: ['5.2', '5.3']
celery-version: ['5.2.*', '5.3.*', '5.4.*']
tornado-version: ['6.0']
exclude: # https://docs.celeryq.dev/en/v5.2.7/whatsnew-5.2.html#step-5-upgrade-to-celery-5-2
- python-version: '3.12'
celery-version: '5.2.*'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install celery==${{ matrix.celery-version }}
pip install tornado==${{ matrix.tornado-version }}
pip install -r requirements/default.txt
pip install -r requirements/test.txt
pip install -r requirements/dev.txt
pip install celery==${{ matrix.celery-version }} \
tornado==${{ matrix.tornado-version }} \
-r requirements/dev.txt
- name: Lint with pylint
run: |
pylint flower --rcfile .pylintrc
pylint flower --rcfile .pylintrc
- name: Run unit tests
run: |
Expand Down
5 changes: 2 additions & 3 deletions flower/utils/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ def sort_tasks(tasks, sort_by):
if sort_by.startswith('-'):
sort_by = sort_by.lstrip('-')
reverse = True
for task in sorted(
yield from sorted(
tasks,
key=lambda x: getattr(x[1], sort_by) or sort_keys[sort_by](),
reverse=reverse):
yield task
reverse=reverse)


def get_task_by_id(events, task_id):
Expand Down

0 comments on commit 652ce08

Please sign in to comment.