30
30
runs-on : ${{ format('{0}-latest', matrix.os) }}
31
31
steps :
32
32
- name : Checkout GitHub repo
33
- uses : actions/checkout@v4
33
+ uses : actions/checkout@v5
34
34
- name : Remove driver directories Windows
35
35
if : matrix.os == 'windows'
36
36
run : |
58
58
run : keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit
59
59
- name : Run Tests Stable
60
60
if : matrix.release == 'stable'
61
- uses :
nick-invision/[email protected] .0
61
+ uses :
nick-invision/[email protected] .2
62
62
with :
63
63
timeout_minutes : 40
64
64
max_attempts : 3
@@ -67,28 +67,41 @@ jobs:
67
67
mvn -B test -D"jdk.internal.httpclient.disableHostnameVerification=true"
68
68
- name : Run Tests Nightly Linux/macOS
69
69
if : matrix.release == 'nightly' && matrix.os != 'windows'
70
- uses :
nick-invision/[email protected] .0
70
+ uses :
nick-invision/[email protected] .2
71
71
with :
72
72
timeout_minutes : 40
73
73
max_attempts : 3
74
74
command : |
75
- pip install yq
76
- xml_content=$(curl -sf https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/)
77
- latest_snapshot=$(echo "$xml_content" | xq '.content.data."content-item"' | jq -r 'sort_by(.lastModified) | last | .text')
78
- echo "Latest Selenium Snapshot: $latest_snapshot"
79
- cd examples/java
80
- mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true"
81
-
75
+ # Get current selenium.version from Maven
76
+ current_version=$(mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout)
77
+ echo "Current selenium.version: $current_version"
78
+ # If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
79
+ if [[ $current_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
80
+ major="${BASH_REMATCH[1]}"
81
+ minor="${BASH_REMATCH[2]}"
82
+ next_minor=$((minor + 1))
83
+ new_version="$major.$next_minor.0-SNAPSHOT"
84
+ echo "Using selenium.version $new_version for tests"
85
+ cd examples/java
86
+ mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" -Dselenium.version=$new_version
87
+ fi
82
88
- name : Run Tests Nightly Windows
83
89
if : matrix.release == 'nightly' && matrix.os == 'windows'
84
- uses :
nick-invision/[email protected] .0
90
+ uses :
nick-invision/[email protected] .2
85
91
with :
86
92
timeout_minutes : 40
87
93
max_attempts : 3
88
94
command : |
89
- pip install yq
90
- $xml_content = Invoke-WebRequest -Uri "https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/"
91
- $latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r 'sort_by(.lastModified) | last | .text'
92
- Write-Output "Latest Selenium Snapshot: $latest_snapshot"
93
- cd examples/java
94
- mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true"
95
+ # Get current selenium.version from Maven
96
+ $current_version = & mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout
97
+ Write-Output "Current selenium.version: $current_version"
98
+ # If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
99
+ if ($current_version -match '^([0-9]+)\.([0-9]+)\.([0-9]+)$') {
100
+ $major = $matches[1]
101
+ $minor = $matches[2]
102
+ $next_minor = [int]$minor + 1
103
+ $new_version = "$major.$next_minor.0-SNAPSHOT"
104
+ Write-Output "Using selenium.version $new_version for tests"
105
+ cd examples/java
106
+ mvn -B -U test "-Djdk.internal.httpclient.disableHostnameVerification=true" "-Dselenium.version=$new_version"
107
+ }
0 commit comments