Skip to content
Open
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
97 changes: 84 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,66 @@ on:
permissions: {}

jobs:
lint-test-and-build:
name: test (py${{ matrix.python-version }})
lint-and-typecheck:
name: Lint and typecheck
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: false

- name: Sync dependencies
run: uv sync --all-packages --locked --python 3.12

- name: Lint
run: uv run poe lint

- name: Typecheck
run: uv run poe typecheck

test:
name: Test (${{ matrix.os.name }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os.runner }}
environment: ci
permissions:
contents: read
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os:
- name: Linux
runner: ubuntu-latest
redis-image: redis:7-alpine
redis-url: redis://localhost:6379/9
- name: macOS
runner: macos-latest
redis-image: ""
redis-url: ""
- name: Windows
runner: windows-latest
redis-image: ""
redis-url: ""
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
services:
# The vercel-apscheduler driver tests exercise their Lua scripts against
# a real Redis; without this service they skip silently.
# a real Redis on Linux; without this service they skip silently.
redis:
image: redis:7-alpine
image: ${{ matrix.os.redis-image }} # zizmor: ignore[unpinned-images]
ports:
- 6379:6379
env:
APSCHEDULER_TEST_REDIS_URL: redis://localhost:6379/9
APSCHEDULER_TEST_REDIS_URL: ${{ matrix.os.redis-url }}
BLOB_READ_WRITE_TOKEN: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }}
Expand Down Expand Up @@ -82,14 +123,8 @@ jobs:
- name: Sync dependencies
run: uv sync --all-packages --locked --python ${{ matrix.python-version }}

- name: Lint
run: ./scripts/lint.sh

- name: Typecheck
run: ./scripts/typecheck.sh

- name: Test
run: ./scripts/test.sh
run: uv run poe test
env:
VERCEL_DEVALUE_JS: ${{ runner.temp }}/devalue
VERCEL_WORKFLOW_CLI: ${{ runner.temp }}/workflow-cli/node_modules/workflow
Expand All @@ -98,5 +133,41 @@ jobs:
if: matrix.python-version == '3.12'
run: uv run poe test-examples

build:
name: Build packages
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: false

- name: Sync dependencies
run: uv sync --all-packages --locked --python 3.12

- name: Build package
run: ./scripts/build.sh
run: uv run poe dist

overall:
name: CI Overall
if: always()
needs:
- build
- lint-and-typecheck
- test
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Check CI results
if: >-
needs.build.result != 'success' ||
needs.lint-and-typecheck.result != 'success' ||
needs.test.result != 'success'
run: exit 1
1 change: 1 addition & 0 deletions changes/vercel-queue/windows-devserver-shutdown.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Force embedded development servers to exit when graceful shutdown stalls.
1 change: 1 addition & 0 deletions changes/vercel-sandbox/windows-process-kill.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Expose Linux process signals consistently on every SDK host platform.
1 change: 1 addition & 0 deletions changes/vercel-workflow/linux-sandbox-platform.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make the workflow sandbox expose Linux paths, platform identity, and clock constants on every host.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dev = [
"hypothesis>=6.0.0,<7",
"respx>=0.21.0,<1",
"cryptography>=48.0.1",
"uvloop<1",
"uvloop<1; sys_platform != 'win32'",
"mypy>=1.20.2,<2",
"django-stubs>=6.0.6,<7",
"build<2",
Expand All @@ -31,7 +31,7 @@ dev = [
"tomli>=2.0.0,<3; python_version < '3.11'",
"vendoring>=1,<2",
"lograil~=0.7.0",
"ggt>=1.5.5; python_version >= '3.11'",
"ggt>=1.5.6; python_version >= '3.11'",
]

[tool.uv]
Expand Down
4 changes: 2 additions & 2 deletions scripts/poe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ When changing this system, verify all shell code with system's default bash
(helps catching new bash-isms on macOS).

```sh
shellcheck -x scripts/build.sh scripts/poe/tasks/poe scripts/poe/tasks/tool
/bin/bash -n scripts/build.sh scripts/poe/tasks/poe scripts/poe/tasks/tool
shellcheck -x scripts/build.sh
/bin/bash -n scripts/build.sh
python3 -m py_compile scripts/poe/workspace_poe.py scripts/poe/workspace_poe_resolve.py scripts/workspace-task.sh scripts/qa.sh scripts/workspace-root-task.sh
```

Expand Down
16 changes: 8 additions & 8 deletions scripts/poe/poe.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[tool.poe.env]
POE = { default = "${POE_CONF_DIR}/tasks/poe" }
PYTEST = { default = "${POE_CONF_DIR}/tasks/pytest" }
RUFF_CHECK = { default = "${POE_CONF_DIR}/tasks/ruff-check" }
RUFF_CHECK_FIX = { default = "${POE_CONF_DIR}/tasks/ruff-check-fix" }
RUFF_FORMAT = { default = "${POE_CONF_DIR}/tasks/ruff-format" }
RUFF_FORMAT_FIX = { default = "${POE_CONF_DIR}/tasks/ruff-format-fix" }
TY = { default = "${POE_CONF_DIR}/tasks/ty" }
MYPY = { default = "${POE_CONF_DIR}/tasks/mypy" }
POE = { default = "python ${POE_CONF_DIR}/tasks/poe" }
PYTEST = { default = "python ${POE_CONF_DIR}/tasks/tool pytest" }
RUFF_CHECK = { default = "python ${POE_CONF_DIR}/tasks/tool ruff-check" }
RUFF_CHECK_FIX = { default = "python ${POE_CONF_DIR}/tasks/tool ruff-check-fix" }
RUFF_FORMAT = { default = "python ${POE_CONF_DIR}/tasks/tool ruff-format" }
RUFF_FORMAT_FIX = { default = "python ${POE_CONF_DIR}/tasks/tool ruff-format-fix" }
TY = { default = "python ${POE_CONF_DIR}/tasks/tool ty" }
MYPY = { default = "python ${POE_CONF_DIR}/tasks/tool mypy" }

[tool.poe.tasks.fix]
cmd = "$POE_CONF_DIR/workspace_poe.py tool-group fix"
Expand Down
35 changes: 25 additions & 10 deletions scripts/poe/tasks/poe
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
#!/usr/bin/env bash
set -euo pipefail
#!/usr/bin/env python
from __future__ import annotations

if (($# == 0)); then
echo "usage: $0 <poe-task> [args ...]" >&2
exit 2
fi
import subprocess
import sys
from collections.abc import Sequence

task="$1"
shift

poe --dry-run "$task" "$@" 2>&1 | sed 's/^Poe => //'
exec poe -q "$task" "$@"
def main(argv: Sequence[str] | None = None) -> int:
args = list(argv if argv is not None else sys.argv[1:])
if not args:
raise SystemExit(f"usage: {sys.argv[0]} <poe-task> [args ...]")

preview = subprocess.run(
("poe", "--dry-run", *args),
check=False,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
text=True,
)
sys.stdout.write(preview.stdout.replace("Poe => ", "", 1))
if preview.returncode:
return preview.returncode
return subprocess.call(("poe", "-q", *args))


if __name__ == "__main__":
raise SystemExit(main())
Loading
Loading