Skip to content

Commit

Permalink
Merge branch 'trunk' into fix-js-bidi-test
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani authored Jun 26, 2024
2 parents 2bae0e1 + 84cc67e commit c5c3975
Show file tree
Hide file tree
Showing 191 changed files with 2,278 additions and 3,038 deletions.
6 changes: 6 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
changelog:
exclude:
labels:
-dependencies
authors:
- selenium-ci
11 changes: 2 additions & 9 deletions .github/workflows/ci-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,9 @@ jobs:
- edge
- firefox
os:
- ubuntu
- windows
- macos
exclude:
- browser: edge
os: ubuntu
- browser: edge
os: macos
with:
Expand All @@ -94,7 +91,7 @@ jobs:
--local_test_jobs 1
--test_size_filters large
--test_tag_filters ${{ matrix.browser }}
${{ matrix.os != 'windows' && '--pin_browsers=true' || '' }}
${{ matrix.os != 'windows' && '--pin_browsers' || '' }}
//rb/spec/...
integration-tests-remote:
Expand All @@ -107,10 +104,6 @@ jobs:
include:
- browser: edge
os: windows
- browser: chrome
os: ubuntu
- browser: firefox
os: ubuntu
with:
name: Remote Tests (${{ matrix.browser }}, ${{ matrix.os }})
browser: ${{ matrix.browser }}
Expand All @@ -124,5 +117,5 @@ jobs:
--local_test_jobs 1
--test_size_filters large
--test_tag_filters ${{ matrix.browser }}-remote
${{ matrix.os != 'windows' && '--pin_browsers=true' || '' }}
${{ matrix.os != 'windows' && '--pin_browsers' || '' }}
//rb/spec/...
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
git checkout -b release-${{ github.event.inputs.version }}
- name: Update Rust Version
run: |
./go rust:version
./go rust:version[${{ github.event.inputs.version }}]
./go rust:version:commit
- name: Push changes
uses: ad-m/github-push-action@master
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/stage-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Release Staging

on:
pull_request:
types: [closed]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
github-release:
if: >
github.event.pull_request.merged == true &&
github.repository_owner == 'seleniumhq' &&
startsWith(github.event.pull_request.head.ref, 'release-preparation-')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Extract version from branch name
id: extract_version
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=$(echo $BRANCH_NAME | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Tag Release
run: |
git tag selenium-${{ env.VERSION }}
git push origin selenium-${{ env.VERSION }}
- name: Update Nightly Tag to Remove pre-release
run: |
git fetch --tags
git tag -d nightly || echo "Nightly tag not found"
git tag nightly
git push origin refs/tags/nightly --force
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Build and Stage Packages
run: ./go all:package[--config=release]
- name: Generate Draft Release
uses: softprops/action-gh-release@v2
with:
name: Selenium ${{ env.VERSION }}
body: |
## Detailed Changelogs by Component
<img src="https://www.selenium.dev/images/programming/java.svg" width="20" height="20"> **[Java](https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG)** &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;<img src="https://www.selenium.dev/images/programming/python.svg" width="20" height="20"> **[Python](https://github.com/SeleniumHQ/selenium/blob/trunk/py/CHANGES)** &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;<img src="https://www.selenium.dev/images/programming/csharp.svg" width="20" height="20"> **[DotNet](https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/CHANGELOG)** &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;<img src="https://www.selenium.dev/images/programming/ruby.svg" width="20" height="20"> **[Ruby](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)** &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;<img src="https://www.selenium.dev/images/programming/javascript.svg" width="20" height="20"> **[JavaScript](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/CHANGES.md)** &nbsp;&nbsp;&nbsp; | &nbsp;&nbsp;&nbsp;<img src="https://www.selenium.dev/images/browsers/internet-explorer.svg" width="20" height="20"> **[IEDriver](https://github.com/SeleniumHQ/selenium/blob/trunk/cpp/iedriverserver/CHANGELOG)**
<br>
tag_name: selenium-${{ env.VERSION }}
draft: true
generate_release_notes: true
prerelease: false
files: build/dist/*.*

update-documentation:
needs: github-release
uses: ./.github/workflows/update-documentation.yml
with:
tag: selenium-${{ needs.github-release.outputs.version }}
254 changes: 254 additions & 0 deletions .github/workflows/update-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
name: Update Documentation

on:
workflow_dispatch:
inputs:
tag:
description: Release tag (e.g. selenium-4.21.0)
required: true
type: string

workflow_call:
inputs:
tag:
required: true
type: string

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
determine-language:
runs-on: ubuntu-latest
outputs:
language: ${{ steps.get-language.outputs.language }}
steps:
- name: Parse language from tag
id: get-language
run: |
tag=${{ inputs.tag }}
language=$(echo $tag | awk -F'-' '{print $NF}')
if [[ ! "$language" =~ ^(java|ruby|python|dotnet|node)$ ]]; then
language="all"
fi
echo "language=$language" > $GITHUB_OUTPUT
java-docs:
runs-on: ubuntu-latest
needs: determine-language
steps:
- name: Checkout the tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Update Documentation
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'java'
run: ./go java:docs
- name: Create patch for changes
run: |
git format-patch -1 HEAD --stdout > java-docs.patch
- name: Upload patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'java'
uses: actions/upload-artifact@v2
with:
name: java-docs-patch
path: java-docs.patch

ruby-docs:
runs-on: ubuntu-latest
needs: determine-language
steps:
- name: Checkout the tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
- name: Update Documentation
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'ruby'
run: ./go rb:docs
- name: Create patch for changes
run: |
git format-patch -1 HEAD --stdout > ruby-docs.patch
- name: Upload patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'ruby'
uses: actions/upload-artifact@v2
with:
name: ruby-docs-patch
path: ruby-docs.patch

python-docs:
needs: determine-language
runs-on: ubuntu-latest
steps:
- name: Checkout the tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Update Documentation
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'python'
run: ./go py:docs
- name: Create patch for changes
run: |
git format-patch -1 HEAD --stdout > python-docs.patch
- name: Upload patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'python'
uses: actions/upload-artifact@v2
with:
name: python-docs-patch
path: python-docs.patch

dotnet-docs:
needs: determine-language
runs-on: ubuntu-latest
steps:
- name: Checkout the tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Install specific version of DocFX tool
# Pinning to 2.75.3 to avoid breaking changes in newer versions
# See https://github.com/dotnet/docfx/issues/9855
run: dotnet tool install --global --version 2.75.3 docfx
- name: Update Documentation
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'dotnet'
run: ./go dotnet:docs
- name: Create patch for changes
run: |
git format-patch -1 HEAD --stdout > dotnet-docs.patch
- name: Upload patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'dotnet'
uses: actions/upload-artifact@v2
with:
name: dotnet-docs-patch
path: dotnet-docs.patch

node-docs:
needs: determine-language
runs-on: ubuntu-latest
steps:
- name: Checkout the tag
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}
- name: Prep git
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
- name: Install npm dependencies
run: |
npm install
npm install --prefix javascript/node/selenium-webdriver
- name: Update Documentation
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'node'
run: ./go node:docs
- name: Create patch for changes
run: |
git format-patch -1 HEAD --stdout > node-docs.patch
- name: Upload patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'node'
uses: actions/upload-artifact@v2
with:
name: node-docs-patch
path: node-docs.patch

merge-patches:
runs-on: ubuntu-latest
needs: [java-docs, ruby-docs, python-docs, dotnet-docs, node-docs]
steps:
- name: Checkout documentation branch
uses: actions/checkout@v4
with:
ref: 'gh-pages'
- name: Create and checkout new branch
run: |
git config --local user.email "selenium-ci@users.noreply.github.com"
git config --local user.name "Selenium CI Bot"
git checkout -b api-docs-${{ inputs.tag }}
- name: Download Java patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'java'
uses: actions/download-artifact@v2
with:
name: java-docs-patch
path: patches/
- name: Download Ruby patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'ruby'
uses: actions/download-artifact@v2
with:
name: ruby-docs-patch
path: patches/
- name: Download Python patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'python'
uses: actions/download-artifact@v2
with:
name: python-docs-patch
path: patches/
- name: Download .NET patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'dotnet'
uses: actions/download-artifact@v2
with:
name: dotnet-docs-patch
path: patches/
- name: Download Node patch
if: needs.determine-language.outputs.language == 'all' || needs.determine-language.outputs.language == 'node'
uses: actions/download-artifact@v2
with:
name: node-docs-patch
path: patches/
- name: Apply patches
run: |
for patch in patches/*.patch; do
git am < "$patch"
done
- name: Push Branch
run: git push origin api-docs-${{ inputs.tag }}
- name: Documentation Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.SELENIUM_CI_TOKEN }}
author: Selenium CI Bot <selenium-ci@users.noreply.github.com>
delete-branch: true
branch: api-docs-${{ inputs.tag }}
base: gh-pages
title: Update documentation for ${{ inputs.tag }}
body: |
This PR updates the API documentation for all bindings
based on the provided tag name.
- Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: documentation
draft: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ py/selenium/webdriver/remote/findElements.js
py/selenium/webdriver/remote/getAttribute.js
py/selenium/webdriver/remote/isDisplayed.js
py/docs/build/
py/docs/source/**/*
py/build/
py/LICENSE
py/pytestdebug.log
Expand Down
Loading

0 comments on commit c5c3975

Please sign in to comment.