From b4b8656bf38a50bf7bd8d46e9df06348d7fb9d21 Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Mon, 14 Sep 2026 17:28:46 +0200 Subject: [PATCH] ci: dependabot version updates + auto-merge parity Brings pgraph-python in line with RTB/MVTB/bdsim: a dependabot.yml (github-actions ecosystem), an auto-merge workflow for patch/minor bumps, and an all-tests-passed gate job branch protection can require. --- .github/dependabot.yml | 8 +++++++ .github/workflows/ci.yml | 13 +++++++++++ .github/workflows/dependabot-auto-merge.yml | 25 +++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..d4065d68 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + labels: + - "dependencies" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1bb88a5..e2bf3f75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,19 @@ jobs: continue-on-error: true run: mypy src/pgraph/PGraph.py + all-tests-passed: + name: All tests passed + needs: unittest + runs-on: ubuntu-latest + if: always() + steps: + - name: Check test matrix result + run: | + if [ "${{ needs.unittest.result }}" != "success" ]; then + echo "test matrix did not succeed: ${{ needs.unittest.result }}" + exit 1 + fi + codecov: needs: unittest runs-on: ubuntu-latest diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..8de7f45f --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,25 @@ +name: Dependabot auto-merge + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v3 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Enable auto-merge for patch/minor bumps + if: ${{ steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor' }} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}