diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fb121a712..cc89f631c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/dependabot-labeler.yaml b/.github/workflows/dependabot-labeler.yaml new file mode 100644 index 000000000..69c94617c --- /dev/null +++ b/.github/workflows/dependabot-labeler.yaml @@ -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 }} diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index d216df9d7..2caf8a017 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -2,6 +2,7 @@ name: e2e on: pull_request: + types: [ labeled, synchronize, opened, reopened ] branches: - main - 'release-*' @@ -19,6 +20,7 @@ on: - '**.adoc' - '**.md' - 'LICENSE' + merge_group: concurrency: group: ${{ github.head_ref }}-${{ github.workflow }} @@ -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: diff --git a/.github/workflows/guided_notebook_tests.yaml b/.github/workflows/guided_notebook_tests.yaml index eb6c5cd26..46979aa96 100644 --- a/.github/workflows/guided_notebook_tests.yaml +++ b/.github/workflows/guided_notebook_tests.yaml @@ -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 }} @@ -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: diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 4aa518824..e5c166464 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -7,6 +7,7 @@ on: - 'v*' pull_request: workflow_dispatch: + merge_group: jobs: precommit: diff --git a/.github/workflows/ui_notebooks_test.yaml b/.github/workflows/ui_notebooks_test.yaml index 283486e6b..cac6641a2 100644 --- a/.github/workflows/ui_notebooks_test.yaml +++ b/.github/workflows/ui_notebooks_test.yaml @@ -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 }} @@ -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: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b7d8ba613..7391bb408 100755 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -5,6 +5,7 @@ on: branches: [ main ] pull_request: branches: [ main ] + merge_group: jobs: unit-tests: