Skip to content

Commit a0a6557

Browse files
committed
feat: compile the project against the nightly Selenium build
Now GA build contains two steps: 1. Build with Selenium 4.41.0-SNAPSHOT (the latest nightly build) 2. Build with Selenium 4.40.0 (currently stable version) It will help to detect compatibility problems with the latest Selenium changes on an early stage.
1 parent 56a8d3d commit a0a6557

File tree

2 files changed

+12
-25
lines changed

2 files changed

+12
-25
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,17 @@ jobs:
7979
- name: Setup Gradle
8080
uses: gradle/actions/setup-gradle@v5
8181

82-
- name: Build with Gradle
83-
# FIXME: Sonatype returns 401 for the snapshots repository
84-
# latest_snapshot=$(curl -sf https://oss.sonatype.org/content/repositories/snapshots/org/seleniumhq/selenium/selenium-api/ | \
85-
# python -c "import sys,re; print(re.findall(r'\d+\.\d+\.\d+-SNAPSHOT', sys.stdin.read())[-1])")
86-
# echo ">>> $latest_snapshot"
87-
# echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
88-
# ./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot
82+
- name: Build with Gradle against Selenium nightly build
8983
run: |
90-
GROUP_ID="org.seleniumhq.selenium"
91-
ARTIFACT_ID="selenium-api"
92-
REPO_URL="https://repo1.maven.org/maven2"
93-
GROUP_PATH="${GROUP_ID//.//}"
94-
METADATA_URL="${REPO_URL}/${GROUP_PATH}/${ARTIFACT_ID}/maven-metadata.xml"
95-
96-
metadata=$(curl -s "$METADATA_URL")
97-
latest_snapshot=$(python3 -c "
98-
import sys, xml.etree.ElementTree as ET
99-
root = ET.fromstring(sys.stdin.read())
100-
print(root.findtext('./versioning/latest'))
101-
" <<< "$metadata")
102-
if [ -z "$latest_snapshot" ]; then
103-
echo "❌ Failed to extract latest released version of ${ARTIFACT_ID} from $metadata"
104-
exit 1
105-
fi
106-
echo "✅ Latest released version of ${ARTIFACT_ID} is: $latest_snapshot"
84+
latest_snapshot=$(curl -sf https://raw.githubusercontent.com/SeleniumHQ/selenium/refs/heads/trunk/java/version.bzl | grep 'SE_VERSION' | sed 's/.*"\(.*\)".*/\1/')
85+
echo ">>> $latest_snapshot"
10786
echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
10887
./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot
10988
89+
- name: Build with Gradle against stable Selenium version
90+
run: |
91+
./gradlew clean build -PisCI
92+
11093
- name: Install Node.js
11194
if: ${{ matrix.e2e-tests }}
11295
uses: actions/setup-node@v6

build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ repositories {
2626

2727
if (project.hasProperty("isCI")) {
2828
maven {
29-
url uri('https://central.sonatype.com/api/v1/publisher')
29+
name = 'Central Portal Snapshots'
30+
url = 'https://central.sonatype.com/repository/maven-snapshots/'
3031
mavenContent {
3132
snapshotsOnly()
3233
}
34+
content {
35+
includeGroup("org.seleniumhq.selenium")
36+
}
3337
}
3438
}
3539
}

0 commit comments

Comments
 (0)