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
32 changes: 32 additions & 0 deletions .github/workflows/live-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Live E2E

on:
workflow_dispatch:

jobs:
live-e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- run: yarn install --frozen-lockfile
- name: Verify required live E2E secrets
env:
VOOSH_E2E_BASE_URL: ${{ secrets.VOOSH_E2E_BASE_URL }}
VOOSH_E2E_CHRIS_TOKEN: ${{ secrets.VOOSH_E2E_CHRIS_TOKEN }}
run: |
test -n "$VOOSH_E2E_BASE_URL" || { echo "Missing required secret VOOSH_E2E_BASE_URL" >&2; exit 1; }
test -n "$VOOSH_E2E_CHRIS_TOKEN" || { echo "Missing required secret VOOSH_E2E_CHRIS_TOKEN" >&2; exit 1; }
- name: Run live E2E smoke tests
env:
VOOSH_RUN_LIVE_E2E: '1'
VOOSH_E2E_BASE_URL: ${{ secrets.VOOSH_E2E_BASE_URL }}
VOOSH_E2E_CHRIS_TOKEN: ${{ secrets.VOOSH_E2E_CHRIS_TOKEN }}
VOOSH_E2E_OTTO_TOKEN: ${{ secrets.VOOSH_E2E_OTTO_TOKEN }}
VOOSH_E2E_ORG_ID: ${{ secrets.VOOSH_E2E_ORG_ID }}
VOOSH_E2E_CALENDAR_ID: ${{ secrets.VOOSH_E2E_CALENDAR_ID }}
VOOSH_E2E_BOOKMARK_CALENDAR_ID: ${{ secrets.VOOSH_E2E_BOOKMARK_CALENDAR_ID }}
run: yarn run test:e2e:live
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ yarn install
yarn run check
```

For local development, the package uses only this repository's internal schema/client sources; there is no sibling SDK dependency. `yarn run check` builds a bundled CLI artifact and runs both unit-style command tests and the built-entrypoint integration tests. To run only the integration tests after a build, use `yarn run test:integration`.
For local development, the package uses only this repository's internal schema/client sources; there is no sibling SDK dependency. `yarn run check` builds a bundled CLI artifact and runs both unit-style command tests and the built-entrypoint integration tests against a local mock HTTP server. To run only the offline integration tests after a build, use `yarn run test:integration`.

Before publishing, run:

Expand All @@ -31,6 +31,31 @@ npm pack --dry-run

The pack output should contain only package metadata/README plus built `dist` files; source, tests, and `node_modules` are excluded by the package `files` whitelist.

### Optional live E2E smoke tests

Live E2E tests are intentionally opt-in and are not part of `yarn run check` or the default CI workflow. They build the CLI and run `dist/index.js` against a real voosh API using explicit live-test environment variables:

```bash
VOOSH_RUN_LIVE_E2E=1 \
VOOSH_E2E_BASE_URL=https://api.example.test \
VOOSH_E2E_CHRIS_TOKEN=... \
yarn run test:e2e:live
```

Required variables:

- `VOOSH_RUN_LIVE_E2E=1` enables the live suite. Without it, the suite is skipped with a reason.
- `VOOSH_E2E_BASE_URL` is the live API base URL. Do not include secrets in this URL.
- `VOOSH_E2E_CHRIS_TOKEN` is the API token used by the built CLI as `VOOSH_API_TOKEN`.

The current live suite performs an authenticated smoke check plus calendar, event, and slot create/read/update/list/delete lifecycles using resources with a `voosh-cli-live-e2e-` prefix so cleanup is scoped to resources created by the test. It also exercises optional flows when fixture secrets are present:

- `VOOSH_E2E_OTTO_TOKEN` enables slot registration/withdrawal as a second user.
- `VOOSH_E2E_ORG_ID` enables organization detail and membership checks.
- `VOOSH_E2E_BOOKMARK_CALENDAR_ID` or `VOOSH_E2E_CALENDAR_ID` enables bookmark add/list/remove checks.

A manual GitHub Actions workflow, `Live E2E`, is available through `workflow_dispatch` only. Configure required repository secrets (`VOOSH_E2E_BASE_URL`, `VOOSH_E2E_CHRIS_TOKEN`) before running it; the workflow fails fast when required secrets are missing. Optional fixture secrets enable the broader smoke checks listed above.

## Usage

```bash
Expand Down Expand Up @@ -146,4 +171,4 @@ The Python CLI remains the parity reference. The current Node CLI covers the v1

- Natural date parsing is deliberately bounded to UTC and the four supported forms above; broader locale/timezone parsing is not implemented yet.
- Organization/member management remains read-only in the Node CLI because the current parity slice only exposed organization and membership listing/retrieval commands.
- This package's integration tests use a local mock HTTP server rather than a live Django instance; live end-to-end smoke testing remains a release/deployment concern.
- Live E2E smoke coverage is opt-in via `yarn run test:e2e:live` and the manual GitHub Actions workflow, so default checks remain offline and deterministic.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && tsup src/index.ts --format esm --platform node --target node20 --dts --sourcemap --no-splitting --external commander",
"test": "yarn build && vitest run tests/cli.test.ts tests/cli.integration.test.ts",
"test:integration": "yarn build && vitest run tests/cli.integration.test.ts",
"test:e2e:live": "yarn build && vitest run tests/live-e2e.test.ts",
"check": "yarn test"
},
"dependencies": {
Expand Down
Loading
Loading