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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ GitHub Action to install `worai`, install Python Playwright + Chromium, and run:
| `debug` | No | `false` | When truthy (`true/1/yes`), appends `--debug`. |
| `log_level` | No | `warning` | Exports `WORAI_LOG_LEVEL` as `debug`, `info`, `warning`, or `error`. |
| `working_directory` | No | `.` | Directory where `worai` runs. |
| `worai_version` | No | `6.20.9` | Exact `worai` version installed by the action. |
| `worai_version` | No | `6.20.10` | Exact `worai` version installed by the action. |
| `install_playwright` | No | `true` | Installs Playwright Python package and browser binaries when truthy (`true/1/yes`). |
| `playwright_version` | No | `1.58.0` | Exact Playwright Python package version installed when Playwright install is enabled. |
| `playwright_browser` | No | `chromium` | Browser passed to `python -m playwright install`. |
Expand Down Expand Up @@ -206,7 +206,7 @@ export WORAI_PROFILE="acme_sitemap"
## Migration from `@v1`

- Replace `uses: wordlift/graph-sync@v1` with `uses: wordlift/graph-sync@v6`.
- Action `v6` defaults to installing `worai` `6.20.9`.
- Action `v6` defaults to installing `worai` `6.20.10`.

## Development

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
worai_version:
description: "Pinned worai version to install"
required: false
default: "6.20.9"
default: "6.20.10"
install_playwright:
description: "Install Playwright Python package and browser binaries (true/false)"
required: false
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ When `config_path` is not provided, `worai` discovers config in this order:

## Installer Behavior

- The action installs a pinned `worai` version via input `worai_version` (default `6.20.9`).
- The action installs a pinned `worai` version via input `worai_version` (default `6.20.10`).
- The action installs Playwright by default via:
- Python package input `playwright_version` (default `1.58.0`)
- Browser input `playwright_browser` (default `chromium`)
Expand Down
2 changes: 1 addition & 1 deletion specs/action-behavior.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- `debug` (optional, default `false`)
- `log_level` (optional, default `warning`)
- `working_directory` (optional, default `.`)
- `worai_version` (optional, default `6.20.9`)
- `worai_version` (optional, default `6.20.10`)
- `output_dir` (optional, default empty)
- `install_playwright` (optional, default `true`)
- `playwright_version` (optional, default `1.58.0`)
Expand Down
15 changes: 11 additions & 4 deletions tests/install-worai.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,22 @@ chmod +x "$FAKE_BIN/python3"

BASE_ENV=(env PATH="$FAKE_BIN:/usr/bin:/bin" PYTHON_CALLS_FILE="$TMP_DIR/python_calls.txt")

# Case 1: missing version
# Case 1: action metadata pins the supported default
default_version=$(awk '
$1 == "worai_version:" { in_input = 1; next }
in_input && $1 == "default:" { gsub(/"/, "", $2); print $2; exit }
' "$ROOT_DIR/action.yml")
assert_eq "6.20.10" "$default_version" "action default should pin the current worai version"

# Case 2: missing version
code=$(run_case missing_version "${BASE_ENV[@]}" "$SCRIPT")
assert_eq "1" "$code" "missing version should fail"

# Case 2: whitespace in version
# Case 3: whitespace in version
code=$(run_case bad_version "${BASE_ENV[@]}" INPUT_WORAI_VERSION="1.2 3" "$SCRIPT")
assert_eq "1" "$code" "version with whitespace should fail"

# Case 3: install with python3
# Case 4: install with python3
rm -f "$TMP_DIR/python_calls.txt"
code=$(run_case install_python3 "${BASE_ENV[@]}" INPUT_WORAI_VERSION="6.18.1" "$SCRIPT")
assert_eq "0" "$code" "python3 install should succeed"
Expand All @@ -63,7 +70,7 @@ second_call=$(sed -n '2p' "$TMP_DIR/python_calls.txt")
assert_eq "-m pip install --upgrade pip" "$first_call" "first command upgrades pip"
assert_eq "-m pip install worai==6.18.1" "$second_call" "second command installs pinned worai"

# Case 4: missing python interpreters
# Case 5: missing python interpreters
EMPTY_BIN="$TMP_DIR/empty-bin"
mkdir -p "$EMPTY_BIN"
code=$(run_case no_python /usr/bin/env PATH="$EMPTY_BIN" INPUT_WORAI_VERSION="6.18.1" /bin/bash "$SCRIPT")
Expand Down