Skip to content

Commit 23a5c31

Browse files
committed
Fix tests
2 parents 430e029 + b99b7e3 commit 23a5c31

File tree

339 files changed

+7565
-5280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

339 files changed

+7565
-5280
lines changed

.github/workflows/calibreapp-image-actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
github.event.pull_request.head.repo.full_name == github.repository)
3737
steps:
3838
- name: Checkout Branch
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v5
4040
- name: Compress Images
4141
id: calibre
4242
uses: calibreapp/image-actions@main

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-24.04
1313
steps:
1414
- name: Checkout repo
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@v5
1616
with:
1717
fetch-depth: 0
1818
- name: Setup Hugo

.github/workflows/dotnet-examples.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ format('{0}-latest', matrix.os) }}
3131
steps:
3232
- name: Checkout GitHub repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
- name: Remove driver directories Windows
3535
if: matrix.os == 'windows'
3636
run: |
@@ -87,8 +87,8 @@ jobs:
8787
- name: Run tests
8888
uses: nick-fields/[email protected]
8989
with:
90-
timeout_minutes: 20
91-
max_attempts: 3
90+
timeout_minutes: 40
91+
max_attempts: 2
9292
command: |
9393
cd examples/dotnet/SeleniumDocs
9494
dotnet test

.github/workflows/java-examples.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ format('{0}-latest', matrix.os) }}
3131
steps:
3232
- name: Checkout GitHub repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
- name: Remove driver directories Windows
3535
if: matrix.os == 'windows'
3636
run: |
@@ -72,23 +72,36 @@ jobs:
7272
timeout_minutes: 40
7373
max_attempts: 3
7474
command: |
75-
pip install yq
76-
xml_content=$(curl -sf https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/)
77-
latest_snapshot=$(echo "$xml_content" | xq '.content.data."content-item"' | jq -r 'sort_by(.lastModified) | last | .text')
78-
echo "Latest Selenium Snapshot: $latest_snapshot"
79-
cd examples/java
80-
mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true"
81-
75+
# Get current selenium.version from Maven
76+
current_version=$(mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout)
77+
echo "Current selenium.version: $current_version"
78+
# If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
79+
if [[ $current_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
80+
major="${BASH_REMATCH[1]}"
81+
minor="${BASH_REMATCH[2]}"
82+
next_minor=$((minor + 1))
83+
new_version="$major.$next_minor.0-SNAPSHOT"
84+
echo "Using selenium.version $new_version for tests"
85+
cd examples/java
86+
mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" -Dselenium.version=$new_version
87+
fi
8288
- name: Run Tests Nightly Windows
8389
if: matrix.release == 'nightly' && matrix.os == 'windows'
8490
uses: nick-invision/[email protected]
8591
with:
8692
timeout_minutes: 40
8793
max_attempts: 3
8894
command: |
89-
pip install yq
90-
$xml_content = Invoke-WebRequest -Uri "https://oss.sonatype.org/service/local/repositories/snapshots/content/org/seleniumhq/selenium/selenium-java/"
91-
$latest_snapshot = $xml_content.Content | xq '.content.data.\"content-item\"' | jq -r 'sort_by(.lastModified) | last | .text'
92-
Write-Output "Latest Selenium Snapshot: $latest_snapshot"
93-
cd examples/java
94-
mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true"
95+
# Get current selenium.version from Maven
96+
$current_version = & mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout
97+
Write-Output "Current selenium.version: $current_version"
98+
# If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
99+
if ($current_version -match '^([0-9]+)\.([0-9]+)\.([0-9]+)$') {
100+
$major = $matches[1]
101+
$minor = $matches[2]
102+
$next_minor = [int]$minor + 1
103+
$new_version = "$major.$next_minor.0-SNAPSHOT"
104+
Write-Output "Using selenium.version $new_version for tests"
105+
cd examples/java
106+
mvn -B -U test "-Djdk.internal.httpclient.disableHostnameVerification=true" "-Dselenium.version=$new_version"
107+
}

.github/workflows/js-examples.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -30,41 +30,7 @@ jobs:
3030
runs-on: ${{ format('{0}-latest', matrix.os) }}
3131
steps:
3232
- name: Checkout GitHub repo
33-
uses: actions/checkout@v4
34-
- name: Install Chrome for set binary test
35-
uses: browser-actions/setup-chrome@v1
36-
with:
37-
chrome-version: stable
38-
id: setup-chrome
39-
- name: Install Edge for set binary test
40-
uses: browser-actions/setup-edge@v1
41-
with:
42-
edge-version: stable
43-
id: setup-edge
44-
- name: Install Firefox for set binary test
45-
if: matrix.os != 'windows'
46-
uses: browser-actions/setup-firefox@v1
47-
with:
48-
firefox-version: latest
49-
id: setup-firefox
50-
- name: Set ENV Windows
51-
if: matrix.os == 'windows'
52-
run: |
53-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
54-
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
55-
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
56-
- name: Set ENV Mac
57-
if: matrix.os == 'macos'
58-
run: |
59-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
60-
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
61-
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
62-
- name: Set ENV Linux
63-
if: matrix.os == 'ubuntu'
64-
run: |
65-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
66-
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
67-
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
33+
uses: actions/checkout@v5
6834
- name: Remove driver directories Windows
6935
if: matrix.os == 'windows'
7036
run: |
@@ -118,8 +84,8 @@ jobs:
11884
- name: Run tests
11985
uses: nick-invision/[email protected]
12086
with:
121-
timeout_minutes: 20
122-
max_attempts: 3
87+
timeout_minutes: 40
88+
max_attempts: 2
12389
command: |
12490
cd examples/javascript
12591
npm test

.github/workflows/kotlin-examples.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,7 @@ jobs:
2929
runs-on: ${{ format('{0}-latest', matrix.os) }}
3030
steps:
3131
- name: Checkout GitHub repo
32-
uses: actions/checkout@v4
33-
- name: Install Chrome for set binary test
34-
uses: browser-actions/setup-chrome@v1
35-
with:
36-
chrome-version: stable
37-
id: setup-chrome
38-
- name: Install Edge for set binary test
39-
uses: browser-actions/setup-edge@v1
40-
with:
41-
edge-version: stable
42-
id: setup-edge
43-
- name: Install Firefox for set binary test
44-
if: matrix.os != 'windows'
45-
uses: browser-actions/setup-firefox@v1
46-
with:
47-
firefox-version: latest
48-
id: setup-firefox
49-
- name: Set ENV Windows
50-
if: matrix.os == 'windows'
51-
run: |
52-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
53-
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
54-
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
55-
- name: Set ENV Mac
56-
if: matrix.os == 'macos'
57-
run: |
58-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
59-
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
60-
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
61-
- name: Set ENV Linux
62-
if: matrix.os == 'ubuntu'
63-
run: |
64-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
65-
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
66-
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
32+
uses: actions/checkout@v5
6733
- name: Remove driver directories Windows
6834
if: matrix.os == 'windows'
6935
run: |
@@ -85,8 +51,8 @@ jobs:
8551
- name: Run tests
8652
uses: nick-invision/[email protected]
8753
with:
88-
timeout_minutes: 20
89-
max_attempts: 3
54+
timeout_minutes: 40
55+
max_attempts: 2
9056
command: |
9157
cd examples/kotlin
9258
mvn -B test

.github/workflows/label-commenter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
comment:
1414
runs-on: ubuntu-24.04
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
- name: Label Commenter
1818
uses: peaceiris/actions-label-commenter@v1

.github/workflows/link-check.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ on:
77
push:
88
branches:
99
- trunk
10+
paths:
11+
- 'website_and_docs/**'
1012
pull_request:
13+
paths:
14+
- 'website_and_docs/**'
1115

1216
jobs:
1317
htmltest:
@@ -16,7 +20,7 @@ jobs:
1620
group: ${{ github.workflow }}-${{ github.ref }}
1721
steps:
1822
- name: Check out repository
19-
uses: actions/checkout@v4
23+
uses: actions/checkout@v5
2024

2125
- name: Set up Hugo
2226
uses: peaceiris/actions-hugo@v3
@@ -27,7 +31,7 @@ jobs:
2731
- name: Setup Node
2832
uses: actions/setup-node@v4
2933
with:
30-
node-version: '18.14.2'
34+
node-version: '22.18.0'
3135
cache: 'npm'
3236
# The action defaults to search for the dependency file (package-lock.json,
3337
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its

.github/workflows/python-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
runs-on: ${{ format('{0}-latest', matrix.os) }}
4848
steps:
4949
- name: Checkout GitHub repo
50-
uses: actions/checkout@v4
50+
uses: actions/checkout@v5
5151
- name: Remove driver directories Windows
5252
if: matrix.os == 'windows'
5353
run: |
@@ -101,4 +101,4 @@ jobs:
101101
max_attempts: 3
102102
command: |
103103
cd examples/python
104-
pytest --reruns 3
104+
pytest --reruns 3 -n auto

.github/workflows/ruby-examples.yml

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ format('{0}-latest', matrix.os) }}
3131
steps:
3232
- name: Checkout GitHub repo
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
- name: Remove driver directories Windows
3535
if: matrix.os == 'windows'
3636
run: |
@@ -41,13 +41,17 @@ jobs:
4141
if: matrix.os != 'windows'
4242
run: |
4343
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
44-
- name: Start Xvfb
44+
- name: Setup Fluxbox and Xvfb
4545
if: matrix.os == 'ubuntu'
46-
run: Xvfb :99 &
46+
run: |
47+
sudo apt-get -y install fluxbox libxss1 libappindicator3-1 libindicator7
48+
Xvfb :99 &
49+
fluxbox -display :99 &
50+
echo "DISPLAY=:99" >> "$GITHUB_ENV"
4751
- name: Set up Ruby
4852
uses: ruby/setup-ruby@v1
4953
with:
50-
ruby-version: 3.0
54+
ruby-version: 3.2
5155
bundler-cache: true
5256
- name: Install Gems Nightly non-Windows
5357
if: matrix.release == 'nightly' && matrix.os != 'windows'
@@ -83,11 +87,43 @@ jobs:
8387
with:
8488
distribution: 'temurin'
8589
java-version: 11
86-
- name: Run tests
90+
- name: Run tests on Windows
91+
if: matrix.os == 'windows'
92+
uses: nick-invision/[email protected]
93+
with:
94+
timeout_minutes: 40
95+
max_attempts: 2
96+
command: |
97+
cd examples/ruby
98+
bundle exec rspec
99+
new_command_on_retry: |
100+
cd examples/ruby; $env:DEBUG="true"; bundle exec rspec --only-failures --backtrace
101+
- name: Run tests on ${{ matrix.os }}
102+
if: matrix.os != 'windows'
87103
uses: nick-invision/[email protected]
88104
with:
89-
timeout_minutes: 20
90-
max_attempts: 3
105+
timeout_minutes: 40
106+
max_attempts: 2
91107
command: |
92108
cd examples/ruby
93109
bundle exec rspec
110+
new_command_on_retry: |
111+
cd examples/ruby
112+
DEBUG=true bundle exec rspec --only-failures --backtrace
113+
114+
lint:
115+
runs-on: ubuntu-latest
116+
steps:
117+
- name: Checkout GitHub repo
118+
uses: actions/checkout@v5
119+
- name: Set up Ruby
120+
uses: ruby/setup-ruby@v1
121+
with:
122+
ruby-version: 3.2
123+
bundler-cache: true
124+
- name: Install dependencies
125+
working-directory: ./examples/ruby
126+
run: bundle install
127+
- name: Run RuboCop
128+
working-directory: ./examples/ruby
129+
run: bundle exec rubocop

0 commit comments

Comments
 (0)