diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index 7b86e983e85d1..69f5ab7c2256f 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -82,6 +82,9 @@ jobs: steps: - name: Checkout source tree uses: actions/checkout@v4 + - name: Pull latest changes + if: startsWith(github.head_ref, 'renovate/') + run: git pull origin ${{ github.head_ref }} - name: Free space if: inputs.os != 'windows' run: ./scripts/github-actions/free-disk-space.sh diff --git a/.github/workflows/ci-rbe.yml b/.github/workflows/ci-rbe.yml index 2e15949925580..e5b89ac0b7f59 100644 --- a/.github/workflows/ci-rbe.yml +++ b/.github/workflows/ci-rbe.yml @@ -10,7 +10,7 @@ on: jobs: format: name: Format - if: github.repository_owner == 'seleniumhq' + if: github.repository_owner == 'seleniumhq' && startsWith(github.head_ref, 'renovate/') != true uses: ./.github/workflows/bazel.yml with: name: Check format script run @@ -20,7 +20,7 @@ jobs: test: name: Test - if: github.repository_owner == 'seleniumhq' + if: github.repository_owner == 'seleniumhq' && startsWith(github.head_ref, 'renovate/') != true uses: ./.github/workflows/bazel.yml with: name: All RBE tests diff --git a/.github/workflows/ci-renovate-rbe.yml b/.github/workflows/ci-renovate-rbe.yml new file mode 100644 index 0000000000000..fc00c8761b1a7 --- /dev/null +++ b/.github/workflows/ci-renovate-rbe.yml @@ -0,0 +1,61 @@ +name: CI - Renovate - RBE + +on: + push: + branches: + - renovate/* + workflow_dispatch: + +jobs: + format: + runs-on: ubuntu-latest + if: github.repository_owner == 'seleniumhq' + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + - name: java - repin dependencies + if: contains(join(github.event.commits.*.message), '[java]') + run: REPIN=1 bazel run @maven//:pin + - name: rust - repin dependencies + if: contains(join(github.event.commits.*.message), '[rust]') + run: CARGO_BAZEL_REPIN=true bazel sync --only=crates + - name: js - repin dependencies + if: contains(join(github.event.commits.*.message), '[js]') + run: bazel run -- @pnpm//:pnpm install --dir $PWD --lockfile-only + - name: dotnet - repin dependencies + if: contains(join(github.event.commits.*.message), '[dotnet]') + run: ./dotnet/update-deps.sh + - name: py - repin dependencies + if: contains(join(github.event.commits.*.message), '[py]') + run: bazel run //py:requirements.update + - name: Commit files + run: | + export CHANGES=$(git status -s) + if [ -n "$CHANGES" ]; then + git config --local user.email "selenium-ci@users.noreply.github.com" + git config --local user.name "Selenium CI Bot" + git add . + git commit -m 'Repin dependencies' + git push + fi + + check-format: + needs: format + name: Check format + if: github.repository_owner == 'seleniumhq' + uses: ./.github/workflows/bazel.yml + with: + name: Check format script run + caching: false + ruby-version: jruby-9.4.8.0 + run: ./scripts/github-actions/check-format.sh + + test: + name: Test + if: github.repository_owner == 'seleniumhq' + uses: ./.github/workflows/bazel.yml + with: + name: All RBE tests + caching: false + ruby-version: jruby-9.4.8.0 + run: ./scripts/github-actions/ci-build.sh diff --git a/renovate.json b/renovate.json index d21056870ba50..f5aba04d1c54e 100644 --- a/renovate.json +++ b/renovate.json @@ -1,36 +1,82 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": ["config:recommended"], - "labels": ["dependencies"], "packageRules": [ { - "matchPackageNames": ["bazel", "bazelisk"], - "commitMessageSuffix": "[dotnet][java][js][py][rb][rust]" + "matchManagers": [ "bazel", "bazel-module", "bazelisk" ], + "matchPackageNames": [ "!rules_java", "!rules_jvm_external", "!contrib_rules_jvm", "!rules_dotnet", "!aspect_rules_js", "!aspect_rules_ts", "!rules_nodejs", "!rules_python", "!rules_ruby", "!rules_cc" ], + "matchDatasources": [ "!maven" ], + "commitMessagePrefix": "[dotnet][java][js][py][rb][rust]", + "labels": [ "dependencies", "c-build" ] }, { - "matchPackageNames": ["nuget"], - "commitMessagePrefix": "[dotnet]" + "matchManagers": [ "nuget" ], + "commitMessagePrefix": "[dotnet]", + "labels": [ "dependencies", "c-dotnet" ] }, { - "matchPackageNames": ["maven"], - "commitMessagePrefix": "[java]" + "matchPackageNames": [ "rules_dotnet" ], + "commitMessagePrefix": "[dotnet]", + "labels": [ "dependencies", "c-dotnet" ] }, { - "matchPackageNames": ["npm"], - "commitMessagePrefix": "[js]" + "matchManagers": [ "bazel", "bazel-module" ], + "matchDatasources": ["maven"], + "versioning": "maven", + "commitMessagePrefix": "[java]", + "labels": [ "dependencies", "c-java" ] }, { - "matchPackageNames": ["pip_requirements"], - "commitMessagePrefix": "[py]" + "matchManagers": [ "bazel-module" ], + "matchPackageNames": [ "rules_java", "rules_jvm_external", "contrib_rules_jvm" ], + "commitMessagePrefix": "[java]", + "labels": [ "dependencies", "c-java" ] }, { - "matchPackageNames": ["bundler", "ruby-version"], - "commitMessagePrefix": "[rb]" + "matchManagers": [ "maven" ], + "commitMessagePrefix": "[java]", + "labels": [ "dependencies", "c-java" ] }, { - "matchPackageNames": ["cargo"], - "commitMessagePrefix": "[rust]" + "matchManagers": [ "npm" ], + "commitMessagePrefix": "[js]", + "labels": [ "dependencies", "c-nodejs" ] + }, + { + "matchPackageNames": [ "aspect_rules_js", "aspect_rules_ts", "rules_nodejs" ], + "commitMessagePrefix": "[js]", + "labels": [ "dependencies", "c-nodejs" ] + }, + { + "matchManagers": [ "pip_requirements", "pip_setup" ], + "commitMessagePrefix": "[py]", + "labels": [ "dependencies", "c-py" ] + }, + { + "matchPackageNames": [ "rules_python" ], + "commitMessagePrefix": "[py]", + "labels": [ "dependencies", "c-py" ] + }, + { + "matchManagers": [ "bundler", "ruby-version" ], + "commitMessagePrefix": "[rb]", + "labels": [ "dependencies", "c-rb" ] + }, + { + "matchPackageNames": [ "rules_ruby" ], + "commitMessagePrefix": "[rb]", + "labels": [ "dependencies", "c-rb" ] + }, + { + "matchManagers": [ "cargo" ], + "commitMessagePrefix": "[rust]", + "labels": [ "dependencies", "c-rust" ] + }, + { + "matchPackageNames": [ "rules_cc" ], + "commitMessagePrefix": "[rust]", + "labels": [ "dependencies", "c-rust" ] } ], - "prConcurrentLimit": 5 + "prConcurrentLimit": 10 }