Skip to content

Dependabot Enhancements #715

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

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
34 changes: 25 additions & 9 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,42 @@
version: 2
updates:
# This is to update requirements.txt files in the guided-demos, and e2e directories.
# The group configuration option is used to group updates for consistency across related directories.
- package-ecosystem: "pip"
directories:
- "**/demo-notebooks/guided-demos*"
- "/tests/e2e"
schedule:
interval: "weekly"
groups:
requirements.txt:
patterns:
- "*"
open-pull-requests-limit: 10
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
open-pull-requests-limit: 4
labels:
- "dependabot"
- "test-guided-notebooks"

# pip means poetry in this case, this keeps poetry.lock up to date with constraints in pyproject.toml.
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
open-pull-requests-limit: 1
labels:
- "dependabot"
- "test-guided-notebooks"

# npm means yarn in this case, this keeps yarn.lock up to date with constraints in package.json.
- package-ecosystem: "npm"
directory: "/ui-tests"
schedule:
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
open-pull-requests-limit: 1
labels:
- "dependabot"
- "test-ui-notebooks"
27 changes: 27 additions & 0 deletions .github/workflows/dependabot-labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow file adds the 'lgtm' and 'approved' labels to Dependabot PRs
# This is done to ensure that the PRs that pass e2e are automatically merged/added to merge-queues by the CodeFlare bot
name: Dependabot Labeler

on:
pull_request:
types: [ labeled, synchronize, opened, reopened ]

jobs:
add-approve-lgtm-label:
if: ${{ github.actor == 'dependabot[bot]' && contains(github.event.pull_request.labels.*.name, 'dependabot') }}
runs-on: ubuntu-latest

# Permission required to edit a PR
permissions:
pull-requests: write
issues: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Add approve and lgtm labels to Dependabot PR
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "lgtm" --add-label "approved"
env:
GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }}
4 changes: 3 additions & 1 deletion .github/workflows/e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: e2e

on:
pull_request:
types: [ labeled, synchronize, opened, reopened ]
branches:
- main
- 'release-*'
Expand All @@ -19,6 +20,7 @@ on:
- '**.adoc'
- '**.md'
- 'LICENSE'
merge_group:

concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
Expand All @@ -29,7 +31,7 @@ env:

jobs:
kubernetes:

if: contains(github.event.pull_request.labels.*.name, 'e2e') || github.event_name == 'merge_group'
runs-on: ubuntu-20.04-4core-gpu

steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/guided_notebook_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Guided notebooks tests

on:
pull_request:
types: [ labeled ]
types: [ labeled, synchronize, opened, reopened ]

concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
Expand All @@ -13,7 +13,7 @@ env:

jobs:
verify-0_basic_ray:
if: ${{ github.event.label.name == 'test-guided-notebooks' }}
if: contains(github.event.pull_request.labels.*.name, 'test-guided-notebooks')
runs-on: ubuntu-20.04-4core

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- 'v*'
pull_request:
workflow_dispatch:
merge_group:

jobs:
precommit:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ui_notebooks_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: UI notebooks tests

on:
pull_request:
types: [labeled]
types: [ labeled, synchronize, opened, reopened ]

concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
Expand All @@ -13,7 +13,7 @@ env:

jobs:
verify-3_widget_example:
if: ${{ github.event.label.name == 'test-guided-notebooks' || github.event.label.name == 'test-ui-notebooks'}}
if: contains(github.event.pull_request.labels.*.name, 'test-guided-notebooks') || contains(github.event.pull_request.labels.*.name, 'test-ui-notebooks')
runs-on: ubuntu-20.04-4core

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:

jobs:
unit-tests:
Expand Down