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
16 changes: 16 additions & 0 deletions changelog/2026-04-13-ci-test-scripts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
slug: ci-test-scripts
title: Automatically test scripts and flows on deploy
tags: ['Scripts', 'Flows']
description: Write test scripts that run automatically every time the script or flow they cover is deployed.
version: v1.681.0
features:
[
'Add a "// test: script/path" annotation to turn any script into a test for another script or flow',
'Tests run automatically every time the target is deployed',
'Results (pass/fail/running) shown on script and flow detail pages',
'CI badges and summary on workspace fork comparison page',
'Built-in test templates for TypeScript and Python'
]
docs: /docs/advanced/ci_tests
---
16 changes: 16 additions & 0 deletions changelog/2026-04-13-user-offboarding/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
slug: user-offboarding
title: Reassign a user's items when removing them
tags: ['User management']
description: When removing a user, reassign all their scripts, flows, apps, resources, schedules, and triggers to another user or folder so nothing breaks.
version: v1.681.0
features:
[
'Preview everything owned by the user before taking action',
'Reassign all items to another user or folder in one step',
'Reassign-only mode to transfer ownership without removing the user',
'Conflicts are detected and blocked before anything is moved',
'Instance-level offboarding across all workspaces from superadmin settings'
]
docs: /docs/core_concepts/roles_and_permissions#user-offboarding
---
12 changes: 12 additions & 0 deletions docs/advanced/12_deploy_to_prod/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,15 @@ More details at:
href="/docs/core_concepts/staging_prod"
/>
</div>

## CI test scripts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a bit of text

You can attach test scripts to any [script](../../script_editor/index.mdx) or [flow](../../flows/1_flow_editor.mdx) so they run automatically on each deployment, catching regressions before they reach production.

<div className="grid grid-cols-2 gap-6 mb-4">
<DocCard
title="CI test scripts"
description="Add test annotations to scripts so they run automatically when the tested script or flow is deployed."
href="/docs/advanced/ci_tests"
/>
</div>
8 changes: 8 additions & 0 deletions docs/advanced/20_workspace_forks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ When git sync is properly setup, the workspace is synchronized with one of the b
description="Deploy to prod using a staging workspace"
href="/docs/advanced/deploy_to_prod"
/>
<DocCard
title="CI test scripts"
description="Add test annotations to scripts so they run automatically when the tested script or flow is deployed."
href="/docs/advanced/ci_tests"
/>
</div>

<div className="grid grid-cols-2 gap-6 mb-4">
<DocCard
title="Collaboration in Windmill"
description="Collaboration in Windmill is simplified through various features and workflows."
Expand Down
82 changes: 82 additions & 0 deletions docs/advanced/24_ci_tests/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
---
description: How do I set up CI tests in Windmill? Write test scripts that automatically run when the tested script or flow is deployed.
---

import DocCard from '@site/src/components/DocCard';

# CI test scripts

Add a `test:` annotation at the top of any script to turn it into a CI test. When the tested [script](../../getting_started/0_scripts_quickstart/index.mdx) or [flow](../../getting_started/6_flows_quickstart/index.mdx) is deployed, the test runs automatically.

## Writing a test script

### Single target

```typescript
// test: script/u/admin/my_script
import * as wmill from "windmill-client";

export async function main() {
const result = await wmill.runScript("u/admin/my_script", {});

if (result !== 42) {
throw new Error(`Expected 42, got ${JSON.stringify(result)}`);
}

return result;
}
```

### Multiple targets

```typescript
// test:
// script/u/admin/script_a
// script/u/admin/script_b
// flow/u/admin/my_flow
import * as wmill from "windmill-client";

export async function main() {
// test all items
}
```

### Python

```python
# test: script/u/admin/my_script
import wmill

def main():
result = wmill.run_script("u/admin/my_script", {})
assert result == 42
return result
```

The annotation uses the comment syntax of each language (`//` for TypeScript, `#` for Python, etc.).

The script creation page also provides ready-made CI test templates for TypeScript and Python.

## Where results appear

Test scripts show a yellow **CI test** badge in the script list and detail page.

On the detail page of the tested script or flow, each test is listed with its status (pass, fail, or running) and a link to the job run. Results auto-refresh while tests are running.

In [workspace forks](../20_workspace_forks/index.mdx), CI results are also visible:

- The fork banner shows a summary of passing, failing, and running tests across all changed items.
- On the [comparison page](../20_workspace_forks/index.mdx#merge-workspaces-from-the-ui-merge-ui), each changed item displays a CI badge, and a test summary lists all test scripts with their latest results.

<div className="grid grid-cols-2 gap-6 mb-4">
<DocCard
title="Deploy to prod"
description="Set up staging/prod environments with Git-based deployment and workspace forks."
href="/docs/advanced/deploy_to_prod"
/>
<DocCard
title="Workspace forks"
description="Create independent copies of a workspace for parallel development workflows."
href="/docs/advanced/workspace_forks"
/>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/core_concepts/16_roles_and_permissions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,23 @@ Combined with the ["run on behalf of" selector during deployments](../12_staging
href="/docs/core_concepts/staging_prod"
/>
</div>

## User offboarding

When removing a user, you can reassign all their items to another user or [folder](../8_groups_and_folders/index.mdx#folders) so that [schedules](../1_scheduling/index.mdx), [triggers](../../getting_started/8_triggers/index.mdx), and everything else keeps working.

From **Workspace settings** > **Users**, click **Remove** on a user. The modal shows what they own, what runs on their behalf, and what references their paths. Pick a target user or folder, confirm, and everything is moved in one step.

![Offboard user](./offboard_user.png 'Offboard user')

You can also use **Reassign** to transfer ownership without removing the user — useful when moving personal scripts into shared folders.

![Reassign user items](./reassign_user_items.png 'Reassign user items')

If the target already has items at the same paths, the operation is blocked until you resolve the conflicts.

### Instance-level offboarding

[Superadmins](#superadmin) can offboard a user across all workspaces at once from **Instance settings** > **Users**, with a different reassignment target per workspace.

![Global offboard](./global_offboard.png 'Reassign user items globally')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/core_concepts/44_workspace_settings/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Workspace settings are configuration options specific to each workspace and can

Each workspace can be configured through the following sections:

- [Users](../16_roles_and_permissions/index.mdx) - Manage workspace members and their permissions, in particular the operator visibility settings
- [Users](../16_roles_and_permissions/index.mdx) - Manage workspace members, permissions, operator visibility, and [offboarding](../16_roles_and_permissions/index.mdx#user-offboarding)
- [Git Sync](../../advanced/11_git_sync/index.mdx) - Configure Git synchronization for your workspace
- [Deployment UI](../12_staging_prod/index.md) - Customize the deployment interface
- [Protection Rulesets](../56_protection_rulesets/index.mdx) - Enforce governance policies on workspace changes
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,7 @@ const sidebars = {
'advanced/deploy_gh_gl/index',
'core_concepts/staging_prod/index',
'core_concepts/protection_rulesets/index',
'advanced/ci_tests/index',
{
type: 'doc',
id: 'advanced/canonical_deployment_setups/index',
Expand Down
11 changes: 11 additions & 0 deletions src/components/pricing/FeatureList.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,17 @@ export const sections = [
},
link: '/docs/core_concepts/staging_prod'
},
{
name: 'CI test scripts with auto-trigger on deploy',
tiers: {
'tier-free-selfhost': true,
'tier-enterprise-selfhost': true,
'tier-enterprise-cloud': true,
'tier-free': true,
'tier-team': true
},
link: '/docs/advanced/ci_tests'
},
{
name: 'OpenID Connect (OIDC)',
tiers: {
Expand Down
Loading