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 <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2026-03-26 23:21:26 +01:00
committed by GitHub
parent fc854f5a79
commit 814229f808
+62
View File
@@ -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