Skip to content
Merged
Changes from 2 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
28 changes: 23 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +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"
echo "latest_snapshot=$latest_snapshot" >> "$GITHUB_ENV"
./gradlew clean build -PisCI -Pselenium.version=$latest_snapshot
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_version=$(python3 -c "
import sys, xml.etree.ElementTree as ET
root = ET.fromstring(sys.stdin.read())
print(root.findtext('./versioning/latest'))
" <<< "$metadata")
if [ -z "$latest_version" ]; then
echo "❌ Failed to extract latest Selenium version from $metadata"
exit 1
fi
./gradlew clean build -PisCI -Pselenium.version=$latest_version

- name: Install Node.js
if: ${{ matrix.e2e-tests }}
Expand Down
Loading