Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/patchright_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uv sync --all-groups
PLAYWRIGHT_TAG="${{ inputs.playwright_version || github.event.inputs.playwright_version }}"
if [ -z "$PLAYWRIGHT_TAG" ]; then
PLAYWRIGHT_TAG=$(curl -fsSL "https://api.github.com/repos/microsoft/playwright-python/releases/latest" | jq -r '.tag_name')
PLAYWRIGHT_TAG=$(curl -fsSL "https://api.github.com/repos/$GITHUB_REPOSITORY/releases/latest" | jq -r '.tag_name')
else
PLAYWRIGHT_TAG="v${PLAYWRIGHT_TAG#v}"
fi
Expand Down
21 changes: 15 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# Only for test Runs, does not relate to actual Patchright package
[build-system]
requires = ["setuptools>=61.0", "setuptools-scm>=9"]
build-backend = "setuptools.build_meta"

[project]
name = "patchright-tests"
version = "1.0.0"
name = "patchright"
dynamic = ["version"]
description = "Undetected Python version of the Playwright testing and automation library."
requires-python = ">=3.11"
dependencies = [
"patchright>=1.59.1",
]

[tool.setuptools]
packages = []

Comment thread
Vinyzu marked this conversation as resolved.
[tool.setuptools_scm]

[tool.uv]
package = false

[tool.pytest.ini_options]
addopts = "-Wall -rsx" # -s
Expand Down
8 changes: 8 additions & 0 deletions utils/release_version_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ echo "Latest release of the Patchright-Python: $patchright_version"

# Compare the versions
if version_is_behind "$patchright_version" "$playwright_version"; then
playwright_minor=${playwright_version#v}
playwright_minor=${playwright_minor%.*}
driver_releases=$(curl -fsSL "https://api.github.com/repos/Kaliiiiiiiiii-Vinyzu/patchright/releases?per_page=100") || exit 1
if ! jq -e --arg minor "$playwright_minor" 'any(.[].tag_name | ltrimstr("v"); startswith($minor + ".") and (try (split(".") | map(tonumber) | length == 3) catch false))' <<< "$driver_releases" >/dev/null; then
echo "Patchright driver release for Playwright $playwright_version is not available yet. Skipping release."
echo "proceed=false" >>$GITHUB_OUTPUT
exit 0
fi
echo "$REPO is behind microsoft/playwright-python. Building & Patching..."
echo "proceed=true" >>$GITHUB_OUTPUT
echo "playwright_version=$playwright_version" >>$GITHUB_ENV
Expand Down