Skip to content

Commit 72e8bcc

Browse files
committed
build: adopt async-pipeline for verification
Replace the hand-written CI workflow with the verify graph defined in pipeline.ts: typecheck -> test -> build -> pack:check, cached by declared inputs, plus a standalone lint task. The GitHub workflow and the pipeline:* scripts are generated by async-pipeline's sync (.github/async-pipeline.lock.json and .async-pipeline/tasks.lock.json record ownership); release.yml stays as release plumbing. release:check now delegates to the pipeline: async-pipeline run verify --force. Requires @async/pipeline 0.2.0 on npm and a local pnpm install to update the lockfile before CI can go green.
1 parent af846b8 commit 72e8bcc

7 files changed

Lines changed: 224 additions & 44 deletions

File tree

.async-pipeline/tasks.lock.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"version": 1,
3+
"generator": "@async/pipeline",
4+
"config": "pipeline.ts",
5+
"prefix": "pipeline",
6+
"runners": [
7+
"package"
8+
],
9+
"targets": [
10+
{
11+
"package": "async-web"
12+
}
13+
],
14+
"manifests": [
15+
{
16+
"path": "package.json",
17+
"runner": "package",
18+
"field": "scripts",
19+
"commands": [
20+
{
21+
"name": "pipeline:verify",
22+
"value": "async-pipeline run verify"
23+
},
24+
{
25+
"name": "pipeline:github:generate",
26+
"value": "async-pipeline github generate"
27+
},
28+
{
29+
"name": "pipeline:sync:check",
30+
"value": "async-pipeline sync check"
31+
}
32+
]
33+
}
34+
],
35+
"commands": [
36+
{
37+
"name": "pipeline:verify",
38+
"value": "async-pipeline run verify"
39+
},
40+
{
41+
"name": "pipeline:github:generate",
42+
"value": "async-pipeline github generate"
43+
},
44+
{
45+
"name": "pipeline:sync:check",
46+
"value": "async-pipeline sync check"
47+
}
48+
],
49+
"hash": "sha256:b8f313edecc2d372a6b53183b2d8898fc9205f4e90bc441b63b41671eb02accc",
50+
"generatedAt": "2026-06-11T19:54:11.844Z"
51+
}

.github/async-pipeline.lock.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"version": 2,
3+
"generator": "@async/pipeline",
4+
"config": "pipeline.ts",
5+
"workflow": ".github/workflows/async-pipeline.yml",
6+
"hash": "sha256:eec941f0286d856c4abda23e2767c9561c7c3b95b872e3a6bf776a43f7dc7402",
7+
"generatedAt": "2026-06-11T19:54:11.736Z",
8+
"triggers": {
9+
"pull_request": {},
10+
"push": {
11+
"branches": [
12+
"main"
13+
]
14+
},
15+
"workflow_dispatch": {}
16+
},
17+
"jobs": [
18+
{
19+
"id": "verify",
20+
"target": [
21+
"pack"
22+
],
23+
"trigger": [
24+
"pr",
25+
"main"
26+
],
27+
"env": {},
28+
"if": "(github.event_name == 'pull_request') || (github.event_name == 'push' && (github.ref == 'refs/heads/main'))"
29+
}
30+
],
31+
"packageManager": "pnpm",
32+
"nodeVersion": "24",
33+
"taskCache": true
34+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Generated by async-pipeline. Do not edit by hand.
2+
# Run: async-pipeline github generate
3+
4+
name: Async Pipeline
5+
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- "main"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
verify:
18+
name: verify
19+
if: (github.event_name == 'pull_request') || (github.event_name == 'push' && (github.ref == 'refs/heads/main'))
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
25+
- name: Restore task cache
26+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
27+
with:
28+
path: .async/cache
29+
key: async-pipeline-${{ runner.os }}-${{ github.sha }}
30+
restore-keys: |
31+
async-pipeline-${{ runner.os }}-
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
35+
with:
36+
node-version: 24
37+
registry-url: https://registry.npmjs.org/
38+
package-manager-cache: false
39+
40+
- name: Enable pnpm
41+
run: |
42+
corepack enable
43+
corepack prepare pnpm@10.20.0 --activate
44+
45+
- name: Install dependencies
46+
run: pnpm install --frozen-lockfile
47+
48+
- name: Check generated workflow
49+
run: pnpm async-pipeline github check
50+
51+
- name: Run pipeline job
52+
run: pnpm async-pipeline run verify
53+
env:
54+
CI: true

.github/workflows/ci.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
/packages/*/dist
77
/packages/*/*.tsbuildinfo
88
/*.tgz
9+
/.async

package.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,18 @@
88
"packageManager": "pnpm@10.20.0",
99
"scripts": {
1010
"build": "pnpm --dir packages/router build && pnpm --dir packages/webruntime build && pnpm --dir packages/web build",
11-
"typecheck": "pnpm -r typecheck",
12-
"test": "pnpm -r test",
1311
"lint": "pnpm -r lint",
14-
"release:check": "pnpm typecheck && pnpm test && pnpm build && pnpm --dir packages/web run pack:check"
12+
"pipeline:github:generate": "async-pipeline github generate",
13+
"pipeline:sync:check": "async-pipeline sync check",
14+
"pipeline:verify": "async-pipeline run verify",
15+
"release:check": "pnpm async-pipeline run verify --force",
16+
"test": "pnpm -r test",
17+
"typecheck": "pnpm -r typecheck"
1518
},
1619
"engines": {
1720
"node": ">=20"
21+
},
22+
"devDependencies": {
23+
"@async/pipeline": "^0.2.0"
1824
}
1925
}

pipeline.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import { definePipeline, job, sh, task, trigger } from "@async/pipeline";
2+
3+
export default definePipeline({
4+
name: "async-web",
5+
cache: "file:local",
6+
triggers: {
7+
pr: trigger.github({ events: ["pull_request"] }),
8+
main: trigger.github({ events: ["push"], branches: ["main"] })
9+
},
10+
sync: {
11+
github: true,
12+
tasks: {
13+
prefix: "pipeline",
14+
runners: ["package"],
15+
targets: [{ package: "async-web" }],
16+
jobs: ["verify"],
17+
scripts: {
18+
"sync:check": "sync check",
19+
"github:generate": "github generate"
20+
}
21+
}
22+
},
23+
namedInputs: {
24+
source: [
25+
"packages/*/src/**/*",
26+
"packages/*/tests/**/*",
27+
"packages/*/scripts/**/*",
28+
"packages/*/package.json",
29+
"packages/*/tsconfig*.json",
30+
"packages/*/vitest.config.ts",
31+
"package.json",
32+
"pnpm-lock.yaml",
33+
"pnpm-workspace.yaml",
34+
"tsconfig.base.json",
35+
"tsconfig.json"
36+
]
37+
},
38+
tasks: {
39+
typecheck: task({
40+
inputs: ["source"],
41+
cache: true,
42+
run: sh`pnpm typecheck`
43+
}),
44+
lint: task({
45+
inputs: ["source"],
46+
cache: true,
47+
run: sh`pnpm lint`
48+
}),
49+
test: task({
50+
dependsOn: ["typecheck"],
51+
inputs: ["source"],
52+
cache: true,
53+
run: sh`pnpm test`
54+
}),
55+
build: task({
56+
dependsOn: ["test"],
57+
inputs: ["source"],
58+
outputs: ["packages/*/dist/**"],
59+
cache: true,
60+
run: sh`pnpm build`
61+
}),
62+
pack: task({
63+
dependsOn: ["build"],
64+
inputs: ["source"],
65+
cache: false,
66+
run: sh`pnpm -r pack:check`
67+
})
68+
},
69+
jobs: {
70+
verify: job({
71+
target: "pack",
72+
trigger: ["pr", "main"]
73+
})
74+
}
75+
});

0 commit comments

Comments
 (0)