From a41786936345673216e232ec98a4eae0f14a202c Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Fri, 7 Nov 2025 09:31:54 +0000 Subject: [PATCH] ci: ensure `example/` passes `renovate-config-validator` As noted in #910, we have invalid configuration shared as an example, which isn't ideal. We should validate any JSON and `config.js` files in the example directory. We need to make sure that we override the ESM settings in this repo, as otherwise we receive: module is not defined in ES module scope When trying to validate the `renovate-config.js`. This also follows the usage of a container from Renovate[0] for using the container to run the validator. [0]: https://github.com/renovatebot/.github/blob/2ab0f77818/.github/workflows/test.yml#L44 --- .github/workflows/build.yml | 19 +++++++++++++++++++ example/package.json | 3 +++ 2 files changed, 22 insertions(+) create mode 100644 example/package.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index df8f1a95..dffe7849 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -113,11 +113,30 @@ jobs: docker-cmd-file: example/entrypoint.sh docker-user: root + renovate-config-validator: + runs-on: ubuntu-latest + timeout-minutes: 10 + container: + image: ghcr.io/renovatebot/renovate:42.54.1@sha256:c4aa5b11d1462705fb2c315970600cedb326d80b24ba1883f8098d93934c4483 + # github hosted runners are running as `1001:127` (ubuntu:docker) + options: -u 1001:0 --group-add 1000 --group-add 12021 --group-add 127 + + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + with: + show-progress: false + + - name: Validate Renovate configuration + working-directory: example + run: | + renovate-config-validator renovate-config.js renovate-config.json + release: needs: - lint - commitlint - e2e + - renovate-config-validator runs-on: ubuntu-latest steps: - name: Setup Git user diff --git a/example/package.json b/example/package.json new file mode 100644 index 00000000..5bbefffb --- /dev/null +++ b/example/package.json @@ -0,0 +1,3 @@ +{ + "type": "commonjs" +}