@@ -87,46 +87,6 @@ def bump_version(ctx: Context, bump: str) -> None:
8787 logging_utils .print_success (f"Updated pyproject.toml to version { new_version } " )
8888
8989
90- @task (name = "lint" )
91- @logging_utils .with_banner ()
92- def lint (ctx : Context ) -> None :
93- """Run linting and type checking."""
94- logging_utils .print_info ("Running ruff check..." )
95- ctx .run ("uv run ruff check" )
96-
97- logging_utils .print_info ("Running ruff format check..." )
98- ctx .run ("uv run ruff format --check" )
99-
100- logging_utils .print_info ("Running ty check..." )
101- ctx .run ("uv run ty check src dev tests" )
102-
103- logging_utils .print_success ("All checks passed" )
104-
105-
106- @task (name = "test" )
107- @logging_utils .with_banner ()
108- def run_tests (ctx : Context , docker_img : str = "webarena-verified:test" ) -> None :
109- """Run tests.
110-
111- Args:
112- docker_img: Docker image to use for tests.
113- """
114- logging_utils .print_info ("Installing Playwright browsers..." )
115- ctx .run ("uv run playwright install chromium --with-deps" )
116-
117- logging_utils .print_info ("Building Docker image..." )
118- ctx .run (f"docker build -t { docker_img } ." )
119-
120- logging_utils .print_info ("Running tests..." )
121- ctx .run (
122- f"uv run pytest --webarena-verified-docker-img { docker_img } "
123- "--ignore=tests/integration/environment_control/ "
124- "--ignore=tests/integration/environments/"
125- )
126-
127- logging_utils .print_success ("All tests passed" )
128-
129-
13090@task (name = "tag" )
13191@logging_utils .with_banner ()
13292def create_tag (ctx : Context , version : str | None = None ) -> None :
@@ -170,54 +130,3 @@ def create_release(ctx: Context, version: str | None = None) -> None:
170130 ctx .run (f'gh release create "{ tag } " --generate-notes --title "{ tag } "' )
171131
172132 logging_utils .print_success (f"Created GitHub release { tag } " )
173-
174-
175- @task (name = "release" , pre = [lint ])
176- @logging_utils .with_banner ()
177- def release (ctx : Context , bump : str , skip_tests : bool = False ) -> None :
178- """Run full release workflow: bump, lint, test, commit, tag, release.
179-
180- Args:
181- bump: Version bump type (patch, minor, major).
182- skip_tests: Skip running tests (for CI where tests run separately).
183- """
184- try :
185- bump_type = BumpType (bump )
186- except ValueError :
187- logging_utils .print_error (f"Invalid bump type: { bump } . Must be one of: patch, minor, major" )
188- sys .exit (1 )
189-
190- # Calculate versions
191- current = _get_current_version ()
192- new_version = _bump_version (current , bump_type )
193- tag = f"v{ new_version } "
194-
195- # Check tag doesn't exist
196- if _tag_exists (ctx , tag ):
197- logging_utils .print_error (f"Tag { tag } already exists" )
198- sys .exit (1 )
199-
200- # Bump version
201- logging_utils .print_info (f"Bumping version: { current } -> { new_version } " )
202- _update_pyproject_version (new_version )
203-
204- # Run tests (unless skipped)
205- if not skip_tests :
206- run_tests (ctx )
207-
208- # Commit version bump
209- logging_utils .print_info ("Committing version bump..." )
210- ctx .run ("git add pyproject.toml" )
211- ctx .run (f'git commit -m "Bump version to { new_version } "' )
212- ctx .run ("git push" )
213-
214- # Create and push tag
215- logging_utils .print_info (f"Creating tag { tag } ..." )
216- ctx .run (f'git tag -a "{ tag } " -m "Release { tag } "' )
217- ctx .run (f'git push origin "{ tag } "' )
218-
219- # Create GitHub release
220- logging_utils .print_info (f"Creating GitHub release { tag } ..." )
221- ctx .run (f'gh release create "{ tag } " --generate-notes --title "{ tag } "' )
222-
223- logging_utils .print_success (f"Released { tag } " )
0 commit comments