voidflow 0.8.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +3 -152
  2. package/package.json +23 -1
package/README.md CHANGED
@@ -1,158 +1,9 @@
1
1
  # voidflow
2
2
 
3
- Semi-opinionated GitHub Actions workflows for my personal sites and consultancy shop [RavenFlight Industries, LLC](https://rvnflt.com/github)
4
-
5
- ## Usage
6
-
7
- Point `uses` in your configuration to a workflow, e.g. in your `.github/workflows/ci.yml`
8
-
9
- ```yaml
10
- name: CI
11
- on:
12
- pull_request:
13
- branches: [main, next, live]
14
- types: [opened, synchronize, reopened, ready_for_review]
15
- workflow_dispatch:
16
-
17
- jobs:
18
- validate:
19
- uses: taraxvoid/voidflow/.github/workflows/site-ci.yml@main
20
- ```
21
-
22
- ### Non-GitHub / self-hosted runners
23
-
24
- Pass `runner` (defaults to GitHub runner `ubuntu-latest`)
25
-
26
- ```yaml
27
- jobs:
28
- validate:
29
- uses: taraxvoid/voidflow/.github/workflows/site-ci.yml@main
30
- with:
31
- runner: my-hosted-runner
32
- ```
33
-
34
- ## Workflow Types
35
-
36
- ### Validation / Checks
37
-
38
- Runs lint, typecheck, check for GPL licenses, e2e with Playwright
39
-
40
- ### Unlighthouse (performance / SEO budgets)
41
-
42
- `site-ci.yml` runs `bun run test:e2e:lighthouse` on PRs into `live`. Sites
43
- implement that script with the shared runner here, which serves the built
44
- static directory on a free port and runs
45
- [Unlighthouse](https://unlighthouse.dev/) against it, reusing Playwright's
46
- Chromium. It exits non-zero if a category budget in the site's config fails.
47
-
48
- In the site's `package.json` (pin the tag):
49
-
50
- ```json
51
- "test:e2e:lighthouse": "bun run build && bunx --package @taraxvoid/voidflow@0.6.0 unlighthouse-runner --dir dist"
52
- ```
53
-
54
- Options: `--dir` (default `dist`, use `dist/client` for Cloudflare adapter
55
- builds), `--config` (default `unlighthouse.config.ts`), `--version` (pinned
56
- Unlighthouse version). Start from
57
- [`scripts/unlighthouse/unlighthouse.config.example.ts`](scripts/unlighthouse/unlighthouse.config.example.ts)
58
- and add `.unlighthouse/` to the site's `.gitignore`.
59
-
60
- ### Playwright preview config
61
-
62
- Shared `playwright.config` for Astro sites that run e2e against
63
- `astro preview`. It picks a free port outside CI, sets
64
- `ASTRO_PREVIEW_BACKGROUND=false` (Astro backgrounds `preview` in agent
65
- environments, which makes Playwright think the server exited), and drops the
66
- `webServer` when `PLAYWRIGHT_BASE_URL` is set.
67
-
68
- ```sh
69
- bun add -d @taraxvoid/voidflow # or: pnpm add -D @taraxvoid/voidflow
70
- ```
71
-
72
- ```js
73
- // playwright.config.js
74
- import { definePreviewConfig } from '@taraxvoid/voidflow/playwright'
75
-
76
- export default definePreviewConfig({ ciPort: 4141 })
77
- ```
78
-
79
- The same release is also published unscoped as `voidflow` (identical
80
- contents and version), so `bun add -d voidflow` and
81
- `import ... from 'voidflow/playwright'` work too. `@taraxvoid/voidflow` is the
82
- canonical name.
83
-
84
- Options: `ciPort` (required in CI), `runner` (default `bun`, e.g. `pnpm`),
85
- `timeout` (default 30000), `projects` (default Pixel 7 and Desktop Chrome),
86
- `testDir` (default `./test/e2e`). Requires `@playwright/test` in the site.
87
-
88
- ## Deployments
89
-
90
- Example deployment job added to your workflow above. `resolve-env` maps the
91
- branch to dev/staging/prod once, up front, so its output can be used both to
92
- drive the deploy and to label the job (`Deploy [dev]`, `Deploy [staging]`,
93
- `Deploy [prod]`) — a job's `name:` can reference `needs.<job>.outputs.*` but
94
- not a step output from within itself, hence the split:
95
-
96
- ```yaml
97
- jobs:
98
- resolve-env:
99
- needs: validate
100
- if: github.event_name == 'push'
101
- uses: taraxvoid/voidflow/.github/workflows/resolve-env.yml@main
102
-
103
- deploy:
104
- name: Deploy [${{ needs.resolve-env.outputs.env }}]
105
- needs: resolve-env
106
- if: github.event_name == 'push'
107
- environment: ${{ needs.resolve-env.outputs.env }}
108
- steps:
109
- - uses: actions/checkout@v7.0.1
110
- - uses: taraxvoid/voidflow/actions/cloudflare-deploy@main
111
- with:
112
- env: ${{ needs.resolve-env.outputs.env }}
113
- cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
114
- ```
115
-
116
- ### Versioning
117
-
118
- This project uses semver, released with [release-please](https://github.com/googleapis/release-please)
119
- ([`release-please.yml`](.github/workflows/release-please.yml)). It keeps a standing
120
- `chore(release): X.Y.Z` PR open against `main`, updated as commits land. Merging it bumps
121
- `package.json` and [`CHANGELOG.md`](CHANGELOG.md), tags `vX.Y.Z`, creates the GitHub release,
122
- and publishes to npm. The PR is opened with the org's release-bot GitHub App token
123
- (`RELEASE_BOT_CLIENT_ID` / `RELEASE_BOT_APP_PRIVATE_KEY`) so CI runs on it.
124
-
125
- Commit messages should follow [Conventional Commits](https://www.conventionalcommits.org) —
126
- enforced loosely, as an advisory `commit-msg` hint (see
127
- [`scripts/check-commit-msg.sh`](scripts/check-commit-msg.sh)), not a blocking check. They
128
- drive the version bump and generated changelog.
129
-
130
- Treat `@main` as unstable. Consumers should pin to an exact release tag, e.g. `@v0.3.0` —
131
- there is no floating major-version tag (`@v1`) to track yet.
132
-
133
- ## Self-validation
134
-
135
- This repo validates its own workflows and composite actions (`.github/workflows/ci.yml`):
136
-
137
- - **actionlint** — workflow schema/logic; also shellchecks `run:` steps in `.github/workflows/*.yml` automatically (`shellcheck` ships on `ubuntu-latest`)
138
- - **check-jsonschema** — schema-checks `actions/**/action.yml` and the workflow files against [SchemaStore](https://www.schemastore.org/)'s `github-action.json` / `github-workflow.json`
139
- - **shellcheck** (`scripts/shellcheck-actions.sh`) — checks `run:` steps inside `actions/**/action.yml`, which actionlint doesn't reach
140
- - **zizmor** — security audit (unpinned refs, script injection via `${{ }}` in `run:`, excess permissions, etc.)
141
-
142
- ### Local dev setup
3
+ This is the unscoped mirror of [`@taraxvoid/voidflow`](https://www.npmjs.com/package/@taraxvoid/voidflow), published from the same release with identical code and version. The scoped package is canonical; its README has the documentation.
143
4
 
144
5
  ```sh
145
- brew install just lefthook actionlint shellcheck yq act uv
146
- lefthook install
6
+ bun add -d @taraxvoid/voidflow
147
7
  ```
148
8
 
149
- - `just validate` — run everything CI runs, locally
150
- - `just lint-workflows` / `lint-actions` / `lint-shell` / `security` — run one check at a time
151
- - `just dry-run` — full local run of `ci.yml` via [`act`](https://github.com/nektos/act) (needs Docker running); pass extra args, e.g. `just dry-run -j validation`
152
- - lefthook runs the fast checks (`lint-workflows`, `lint-actions`, `lint-shell`) on `pre-commit`, and `zizmor` on `pre-push`
153
-
154
- **Colima users:** `.actrc` already disables the docker-socket mount (`--container-daemon-socket -`) — `act` binds `/var/run/docker.sock` by default, which doesn't exist under Colima and fails with `operation not supported`. None of these workflow steps need docker-in-docker, so this is safe.
155
-
156
- **Run `just dry-run` from a normal checkout, not a linked git worktree.** `act` copies the working tree via `docker cp` rather than a real clone, so a worktree's `.git` pointer back to the parent repo doesn't resolve inside the container — `git ls-files`-based steps (schema validation, `scripts/shellcheck-actions.sh`) silently see zero files instead of erroring. Verified clean end-to-end (`🏁 Job succeeded`) from a plain clone.
157
-
158
- YMMV, caveat emptor, your satisfaction **not** guaranteed
9
+ Source, issues and docs: <https://github.com/taraxvoid/voidflow>
package/package.json CHANGED
@@ -1,8 +1,21 @@
1
1
  {
2
2
  "name": "voidflow",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Shared workflows, actions and tooling for @taraxvoid sites",
5
5
  "license": "MIT",
6
+ "keywords": [
7
+ "github-actions",
8
+ "ci",
9
+ "reusable-workflows",
10
+ "playwright",
11
+ "unlighthouse",
12
+ "astro",
13
+ "cloudflare"
14
+ ],
15
+ "homepage": "https://github.com/taraxvoid/voidflow#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/taraxvoid/voidflow/issues"
18
+ },
6
19
  "repository": {
7
20
  "type": "git",
8
21
  "url": "git+https://github.com/taraxvoid/voidflow.git"
@@ -25,7 +38,16 @@
25
38
  "playwright",
26
39
  "scripts/unlighthouse"
27
40
  ],
41
+ "engines": {
42
+ "bun": ">=1.4.0"
43
+ },
44
+ "scripts": {
45
+ "test": "bun test"
46
+ },
28
47
  "peerDependencies": {
29
48
  "@playwright/test": ">=1.40"
49
+ },
50
+ "devDependencies": {
51
+ "@playwright/test": "^1.40.0"
30
52
  }
31
53
  }