From 814229f808e602af17b978cc0f624e6880535271 Mon Sep 17 00:00:00 2001 From: Holger Friedrich Date: Thu, 26 Mar 2026 23:21:26 +0100 Subject: [PATCH] Add workflow to resolve itest dependencies (#5422) * Add workflow to resolve itest dependencies Automate the process of building with option -DwithResolver and possibly opening a PR. This might not always be intended as the resolver does not do minimalistic changes, but removes older dependency versions and adds new ones at the end of the bndrun file. But it mitigates the problem that itests fail silently due to missing dependencies (which is still the case with bndtools 7.2.1). Signed-off-by: Holger Friedrich --- .github/workflows/resolver.yml | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/resolver.yml diff --git a/.github/workflows/resolver.yml b/.github/workflows/resolver.yml new file mode 100644 index 000000000..cae61d5e2 --- /dev/null +++ b/.github/workflows/resolver.yml @@ -0,0 +1,62 @@ +name: Resolve itest dependencies + +on: + schedule: + - cron: '0 19 * * *' + workflow_dispatch: + +jobs: + resolve: + name: Resolve itest dependencies + runs-on: 'ubuntu-24.04' + permissions: + contents: write + pull-requests: write + # typical duration is ~15min, set twice the amount as limit (default is 6h) + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Java 21 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' + java-version: '21' + + - name: Set up Cache + uses: actions/cache@v5 + with: + path: | + ~/.m2/repository + !~/.m2/repository/org/openhab + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Build and resolve dependencies + id: build + # call mvnw directly to avoid filtering of the log by the wrapper, + # use more cores, safe to do so as we skip tests (which might depend on load) + run: './mvnw verify -B -T 2.5C -U -DskipChecks -DskipTests -DwithResolver' + env: + MAVEN_OPTS: >- + -Xmx2g + -Dmaven.wagon.http.retryHandler.count=5 + -Dmaven.wagon.httpconnectionManager.ttlSeconds=25 + -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + + - name: Show Resolver Status + run: | + git branch -v + git status + git diff + + - name: Open PR if changed + uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # 8.1.0 + with: + commit-message: "Resolve itest dependencies" + title: "Resolve itest dependencies" + branch: "gha/resolver/${{ github.ref_name }}" + delete-branch: true + # labels: infrastructure