Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 7 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,17 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5

- name: Build with Gradle
# FIXME: Sonatype returns 401 for the snapshots repository
# latest_snapshot=$(curl -sf https://oss.sonatype.org/content/repositories/snapshots/org/seleniumhq/selenium/selenium-api/ | \
# python -c "import sys,re; print(re.findall(r'\d+\.\d+\.\d+-SNAPSHOT', sys.stdin.read())[-1])")
# echo ">>> $latest_snapshot"
# echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
# ./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot
- name: Build with Gradle against Selenium nightly build
run: |
GROUP_ID="org.seleniumhq.selenium"
ARTIFACT_ID="selenium-api"
REPO_URL="https://repo1.maven.org/maven2"
GROUP_PATH="${GROUP_ID//.//}"
METADATA_URL="${REPO_URL}/${GROUP_PATH}/${ARTIFACT_ID}/maven-metadata.xml"

metadata=$(curl -s "$METADATA_URL")
latest_snapshot=$(python3 -c "
import sys, xml.etree.ElementTree as ET
root = ET.fromstring(sys.stdin.read())
print(root.findtext('./versioning/latest'))
" <<< "$metadata")
if [ -z "$latest_snapshot" ]; then
echo "❌ Failed to extract latest released version of ${ARTIFACT_ID} from $metadata"
exit 1
fi
echo "✅ Latest released version of ${ARTIFACT_ID} is: $latest_snapshot"
latest_snapshot=$(curl -sf https://raw.githubusercontent.com/SeleniumHQ/selenium/refs/heads/trunk/java/version.bzl | grep 'SE_VERSION' | sed 's/.*"\(.*\)".*/\1/')
echo ">>> $latest_snapshot"
echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot

- name: Build with Gradle against stable Selenium version
run: |
./gradlew clean build -PisCI

- name: Install Node.js
if: ${{ matrix.e2e-tests }}
uses: actions/setup-node@v6
Expand Down
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ repositories {

if (project.hasProperty("isCI")) {
maven {
url uri('https://central.sonatype.com/api/v1/publisher')
name = 'Central Portal Snapshots'
url = 'https://central.sonatype.com/repository/maven-snapshots/'
mavenContent {
snapshotsOnly()
}
content {
includeGroup("org.seleniumhq.selenium")
}
}
}
}
Expand Down
Loading