Skip to content
Closed
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
24 changes: 24 additions & 0 deletions .fallowrc.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$schema": "https://raw.githubusercontent.com/fallow-rs/fallow/v3.33.1/schema.json",
"entry": [
// Tests use vite-plus/test and are run by the root Vite config.
"**/*.{test,spec}.{js,jsx,ts,tsx,mjs,cjs,mts,cts}",
".github/scripts/__tests__/*.mjs",
// Standalone scripts also run outside package.json scripts.
"bench/*.ts",
"ecosystem-ci/*.ts",
],
"ignorePatterns": [
// Fixture projects and templates are inputs to other programs.
"crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/**",
"packages/cli/src/__tests__/fixtures/**",
"packages/cli/templates/**",
// Native bindings and task types are generated by the Rust build.
"packages/*/binding/**",
"packages/cli/src/run-config.ts",
],
"workspaces": {
// The documentation site has its own pnpm workspace.
"patterns": ["docs"],
},
}
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,23 @@ defaults:
shell: bash

jobs:
fallow:
name: Fallow audit
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

- uses: fallow-rs/fallow@fccff887da0d83db1711379e0a3696dfc2460fdd # v3.33.1
with:
command: audit
version: '3.33.1'
gate: new-only

detect-changes:
runs-on: ubuntu-latest
permissions:
Expand Down Expand Up @@ -1647,6 +1664,7 @@ jobs:
runs-on: ubuntu-latest
if: always()
needs:
- fallow
- docs-fmt
- test
- build-windows-tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ vite
/crates/vp_global_cli/vp
.void/
.direnv
/.fallow/

# PTY snapshot runner failure artifacts (reviewed via the diff, never committed)
crates/vp_cli_snapshots/tests/cli_snapshots/fixtures/*/snapshots/*.md.new
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ You can run this command to build, test and check if there are any snapshot chan
pnpm bootstrap-cli && pnpm test && git status
```

Pull requests also run [Fallow](https://github.com/fallow-rs/fallow) to check for new unused code, duplication, and complexity findings. The audit compares the pull request with its base; existing findings do not fail the check. Run the same version locally with:

```bash
pnpm dlx fallow@3.33.1 audit --base origin/main
```

The audit needs Git history for the base comparison, but does not need a build or installed project dependencies. [`.fallowrc.jsonc`](.fallowrc.jsonc) defines additional entry points and excludes fixture projects, templates, and generated code.

## CLI Snapshot Tests (PTY runner)

CLI output and interactive flows (prompts, pickers, keystrokes, ctrl-c) are tested with the PTY snapshot suite in `crates/vp_cli_snapshots/`. Every step runs in a real pseudo-terminal; snapshots are Markdown files compared with real pass/fail semantics. **Write new CLI tests here**, one fixture directory per scenario with a `snapshots.toml` declaring the cases.
Expand Down
Loading