Skip to content

Update nightly version #1685

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 20 commits into from
Apr 24, 2024
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
23 changes: 20 additions & 3 deletions .github/workflows/dotnet-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,26 @@ jobs:
dotnet-version: 6.x
source-url: https://nuget.pkg.github.com/seleniumhq/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Update Nightly version non-Windows
if: matrix.release == 'nightly' && matrix.os != 'windows-latest'
run:
|
latest_nightly=$(./scripts/latest-nightly-version.sh nuget Selenium.WebDriver)
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Nightly version Windows
if: matrix.release == 'nightly' && matrix.os == 'windows-latest'
shell: pwsh
run:
|
$latest_nightly = ./scripts/latest-nightly-version.ps1 nuget Selenium.WebDriver
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Java
uses: actions/setup-java@v4
with:
Expand All @@ -70,5 +89,3 @@ jobs:
command: |
cd examples/dotnet/SeleniumDocs
dotnet test
env:
SE_RELEASE: ${{ matrix.release }}
13 changes: 12 additions & 1 deletion .github/workflows/java-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
release: [ stable, nightly ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout GitHub repo
Expand All @@ -48,11 +49,21 @@ jobs:
with:
distribution: 'temurin'
java-version: 11
- name: Run Tests
- name: Run Tests Stable
if: matrix.release == 'stable'
uses: nick-invision/[email protected]
with:
timeout_minutes: 20
max_attempts: 3
command: |
cd examples/java
mvn -B test
- name: Run Tests Nightly
if: matrix.release == 'nightly'
uses: nick-invision/[email protected]
with:
timeout_minutes: 20
max_attempts: 3
command: |
cd examples/java
mvn -B -U test -Dselenium.version=4.20.0-SNAPSHOT
18 changes: 14 additions & 4 deletions .github/workflows/js-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,22 @@ jobs:
registry-url: 'https://npm.pkg.github.com'
- name: Use Nightly package.json in Ubuntu/macOS
if: matrix.release == 'nightly' && matrix.os != 'windows-latest'
working-directory: ./examples/javascript
run: mv package.nightly.json package.json
run:
|
latest_nightly=$(./scripts/latest-nightly-version.sh npm selenium-webdriver)
npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Use Nightly package.json in Windows
if: matrix.release == 'nightly' && matrix.os == 'windows-latest'
working-directory: ./examples/javascript
run: Move-Item -Path package.nightly.json -Destination package.json -Force
run:
|
$latest_nightly = ./scripts/latest-nightly-version.ps1 npm selenium-webdriver
npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Requirements
working-directory: ./examples/javascript
run: npm install
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
release: [ stable, nightly ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout GitHub repo
Expand All @@ -47,7 +48,15 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
- name: Install dependencies nightly
if: matrix.release == 'nightly'
working-directory: ./examples/python
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple --force-reinstall -v selenium
- name: Install dependencies stable
if: matrix.release == 'stable'
working-directory: ./examples/python
run: |
python -m pip install --upgrade pip
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/ruby-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
release: [ stable, nightly ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout GitHub repo
Expand All @@ -48,7 +49,30 @@ jobs:
with:
ruby-version: 3.0
bundler-cache: true
- name: Install Gems
- name: Install Gems Nightly non-Windows
if: matrix.release == 'nightly' && matrix.os != 'windows-latest'
run:
|
latest_nightly_webdriver=$(./scripts/latest-nightly-version.sh rubygems selenium-webdriver)
cd examples/ruby
bundle install
bundle remove selenium-webdriver
bundle add selenium-webdriver --version $latest_nightly_webdriver --source "https://token:${{secrets.GITHUB_TOKEN}}@rubygems.pkg.github.com/seleniumhq"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Gems Nightly Windows
if: matrix.release == 'nightly' && matrix.os == 'windows-latest'
run:
|
$latest_nightly_webdriver = ./scripts/latest-nightly-version.ps1 rubygems selenium-webdriver
cd examples/ruby
bundle install
bundle remove selenium-webdriver
bundle add selenium-webdriver --version $latest_nightly_webdriver --source "https://token:${{secrets.GITHUB_TOKEN}}@rubygems.pkg.github.com/seleniumhq"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Gems Stable
if: matrix.release == 'stable'
working-directory: ./examples/ruby
run: bundle install
- name: Set up Java
Expand Down
8 changes: 0 additions & 8 deletions examples/dotnet/SeleniumDocs/SeleniumDocs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.5.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
</ItemGroup>

<ItemGroup Label="Nightly" Condition=" '$(SE_RELEASE)' == 'nightly' ">
<PackageReference Include="Selenium.Support" Version="4.20.0-nightly202404181318" />
<PackageReference Include="Selenium.WebDriver" Version="4.20.0-nightly202404181318" />
</ItemGroup>

<ItemGroup Label="Stable" Condition=" '$(SE_RELEASE)' == 'stable' ">
<PackageReference Include="Selenium.Support" Version="4.19.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.19.0" />
</ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions examples/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.19.1</selenium.version>
</properties>

<repositories>
Expand All @@ -29,12 +30,12 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.19.1</version>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-grid</artifactId>
<version>4.19.1</version>
<version>${selenium.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
16 changes: 0 additions & 16 deletions examples/javascript/package.nightly.json

This file was deleted.

12 changes: 2 additions & 10 deletions examples/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,5 @@ gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.35'
gem 'rubocop-rspec', '~> 2.12'
gem 'selenium-devtools', '~> 0.122'

if ENV['SE_NIGHTLY']
source 'https://rubygems.pkg.github.com/seleniumhq' do
selenium = 'selenium-webdriver'
gem selenium, '~> 4.19.0.nightly'
end
else
gem 'selenium-webdriver', '= 4.19.0'
end
gem 'selenium-devtools', '= 0.123'
gem 'selenium-webdriver', '= 4.19.0'
2 changes: 1 addition & 1 deletion examples/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ DEPENDENCIES
rspec (~> 3.0)
rubocop (~> 1.35)
rubocop-rspec (~> 2.12)
selenium-devtools (~> 0.122)
selenium-devtools (= 0.123)
selenium-webdriver (= 4.19.0)

BUNDLED WITH
Expand Down
9 changes: 9 additions & 0 deletions scripts/latest-nightly-version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$PACKAGE_TYPE = $args[0]
$PACKAGE_NAME = $args[1]

$PATH_PACKAGES_API = "orgs/seleniumhq/packages/$PACKAGE_TYPE/$PACKAGE_NAME/versions"
$ACCEPT_HEADER = "Accept: application/vnd.github+json"
$VERSION_HEADER = "X-GitHub-Api-Version: 2022-11-28"

$ghApiCommand = "gh api -H `"$ACCEPT_HEADER`" -H `"$VERSION_HEADER`" $PATH_PACKAGES_API | jq -r '.[0].name'"
Invoke-Expression -Command $ghApiCommand
12 changes: 12 additions & 0 deletions scripts/latest-nightly-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e

PACKAGE_TYPE="$1"
PACKAGE_NAME="$2"

PATH_PACKAGES_API="orgs/seleniumhq/packages/$PACKAGE_TYPE/$PACKAGE_NAME/versions"
ACCEPT_HEADER="Accept: application/vnd.github+json"
VERSION_HEADER="X-GitHub-Api-Version: 2022-11-28"

gh api -H "$ACCEPT_HEADER" -H "$VERSION_HEADER" $PATH_PACKAGES_API | jq -r '.[0].name'
Loading