ci.yml
This file
Path
.github/workflows/ci.yml
298 lines · 10.6 KiB · YAML
Last changed by
test: move adapter runtime tests into `adapters/*` (#5466)Yusuke Wadabefore adoption645ddd6
History of this fileTake it
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–4why, one step back1name: ci2on:3 push:4 branches: [main, next]feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
lines 5–6why, one step back5 paths-ignore:6 - 'adapters/**'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 7–9why, one step back7 pull_request:8 branches: ['*']9 paths-ignore:feat(adapters): add @hono/bun as a workspace package (#5447)Yusuke Wadabefore adoptionfc2343d
line 10why, one step back10 - 'adapters/**'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 11–50why, one step back11 - 'docs/**'12 - '.vscode/**'13 - 'README.md'14 - '.gitignore'15 - 'LICENSE'1617permissions:18 contents: read1920jobs:21 coverage:22 name: 'Coverage'23 runs-on: ubuntu-latest24 needs:25 - main26 - bun27 - deno28 steps:29 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v630 - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v631 with:32 pattern: coverage-*33 merge-multiple: true34 path: ./coverage35 - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.036 with:37 fail_ci_if_error: true38 directory: ./coverage3940 main:41 name: 'Main'42 runs-on: ubuntu-latest43 steps:44 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v645 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v646 with:47 node-version-file: '.tool-versions'48 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v249 with:50 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 51–57why, one step back51 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.052 with:53 cache: true54 run_install: true55 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v656 with:57 node-version-file: '.tool-versions'chore: introduce Vite+ (#5444)Yusuke Wadabefore adoption5f31392
line 58why, one step back58 - run: pnpm run checkchore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 59–61why, one step back59 - run: pnpm run editorconfig-checker -format github-actions60 - run: pnpm run build61 - run: pnpm run testMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 62–77why, one step back62 - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v563 with:64 name: coverage-main65 path: coverage/6667 jsr-dry-run:68 name: "Checking if it's valid for JSR"69 runs-on: ubuntu-latest70 steps:71 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v672 - uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v273 with:74 deno-version-file: '.tool-versions'75 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v276 with:77 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 78–85why, one step back78 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.079 with:80 cache: true81 run_install: true82 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v683 with:84 node-version-file: '.tool-versions'85 - run: pnpm dlx jsr publish --dry-runMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 86–112why, one step back8687 deno:88 name: 'Deno'89 runs-on: ubuntu-latest90 steps:91 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v692 - uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v293 with:94 deno-version-file: '.tool-versions'95 - run: env NAME=Deno deno test --coverage=coverage/raw/deno-runtime --allow-read --allow-env --allow-write --allow-net -c runtime-tests/deno/deno.json runtime-tests/deno96 - run: deno test -c runtime-tests/deno-jsx/deno.precompile.json --coverage=coverage/raw/deno-precompile-jsx runtime-tests/deno-jsx97 - run: deno test -c runtime-tests/deno-jsx/deno.react-jsx.json --coverage=coverage/raw/deno-react-jsx runtime-tests/deno-jsx98 - run: grep -R '"url":' coverage | grep -v runtime-tests | sed -e 's/.*file:..//;s/.,//' | xargs deno cache --unstable-sloppy-imports99 - run: deno coverage --lcov > coverage/deno-runtime-coverage-lcov.info100 - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5101 with:102 name: coverage-deno103 path: coverage/104105 bun:106 name: 'Bun'107 runs-on: ubuntu-latest108 steps:109 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6110 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2111 with:112 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 113–120why, one step back113 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0114 with:115 cache: true116 run_install: true117 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6118 with:119 node-version-file: '.tool-versions'120 - run: pnpm run test:bunMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 121–133why, one step back121 - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5122 with:123 name: coverage-bun124 path: coverage/125126 bun-windows:127 name: 'Bun - Windows'128 runs-on: windows-latest129 steps:130 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6131 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2132 with:133 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 134–141why, one step back134 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0135 with:136 cache: true137 run_install: true138 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6139 with:140 node-version-file: '.tool-versions'141 - run: pnpm run test:bunMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 142–150why, one step back142143 fastly:144 name: 'Fastly Compute'145 runs-on: ubuntu-latest146 steps:147 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6148 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2149 with:150 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 151–159why, one step back151 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0152 with:153 cache: true154 run_install: true155 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6156 with:157 node-version-file: '.tool-versions'158 - run: pnpm run build159 - run: pnpm run test:fastlyMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 160–174why, one step back160161 node:162 name: 'Node.js v${{ matrix.node }}'163 runs-on: ubuntu-latest164 strategy:165 matrix:166 node: ['20.x', '22.x', '24.x']167 steps:168 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6169 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6170 with:171 node-version: ${{ matrix.node }}172 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2173 with:174 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 175–183why, one step back175 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0176 with:177 cache: true178 run_install: true179 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6180 with:181 node-version-file: '.tool-versions'182 - run: pnpm run build183 - run: pnpm run test:nodeMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 184–195why, one step back184185 workerd:186 name: 'workerd'187 runs-on: ubuntu-latest188 steps:189 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6190 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6191 with:192 node-version-file: '.tool-versions'193 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2194 with:195 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 196–204why, one step back196 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0197 with:198 cache: true199 run_install: true200 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6201 with:202 node-version-file: '.tool-versions'203 - run: pnpm run build204 - run: pnpm run test:workerdMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 205–209why, one step back205206 perf-measures-check-on-pr:207 name: 'Type & Bundle size Check on PR'208 runs-on: ubuntu-latest209 if: github.event_name == 'pull_request'ci: enable reports for type & bundle size check (#5148)Yusuke Wadabefore adoptionbf8608c
lines 210–212why, one step back210 permissions:211 contents: read212 pull-requests: writeMerge commit from forkYusuke Wadabefore adoptionf0b094d
lines 213–230why, one step back213 steps:214 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6215 - uses: ./.github/actions/perf-measures216 with:217 target-ref: 'auto'218219 http-benchmark-on-pr:220 name: 'HTTP Speed Check on PR'221 runs-on: ubuntu-latest222 if: github.event_name == 'pull_request'223 permissions:224 contents: read225 pull-requests: write226 steps:227 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6228 - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2229 with:230 bun-version-file: '.tool-versions'chore: migrate the package manager from bun to pnpm (#5433)Yusuke Wadabefore adoption535ae55
lines 231–237why, one step back231 - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0232 with:233 cache: true234 run_install: true235 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6236 with:237 node-version-file: '.tool-versions'Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 238–298why, one step back238 - name: Install bombardier239 run: |240 wget -O bombardier https://github.com/codesenberg/bombardier/releases/download/v2.0.1/bombardier-linux-amd64241 chmod +x bombardier242 sudo mv bombardier /usr/local/bin/243 - name: Run HTTP benchmark244 run: |245 cd benchmarks/http-server246 bun run benchmark.ts247 - name: Comment PR248 uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7249 if: github.event.pull_request.head.repo.full_name == github.repository250 with:251 script: |252 const fs = require('fs');253 const results = fs.readFileSync('benchmarks/http-server/benchmark-results.md', 'utf8');254255 // Minimize previous benchmark comments256 const comments = await github.rest.issues.listComments({257 owner: context.repo.owner,258 repo: context.repo.repo,259 issue_number: context.issue.number260 });261262 for (const comment of comments.data) {263 if (comment.body.includes('## HTTP Performance Benchmark')) {264 await github.graphql(`265 mutation {266 minimizeComment(input: { subjectId: "${comment.node_id}", classifier: OUTDATED }) {267 minimizedComment {268 isMinimized269 }270 }271 }272 `);273 }274 }275276 // Post new comment277 await github.rest.issues.createComment({278 issue_number: context.issue.number,279 owner: context.repo.owner,280 repo: context.repo.repo,281 body: results282 });283 - name: Show benchmark results for forks284 if: github.event.pull_request.head.repo.full_name != github.repository285 run: |286 echo "## HTTP Performance Benchmark Results"287 echo "Note: Cannot post comment due to security restrictions on fork PRs"288 cat benchmarks/http-server/benchmark-results.md289290 perf-measures-check-on-main:291 name: 'Type & Bundle size Check on Main'292 runs-on: ubuntu-latest293 if: github.ref == 'refs/heads/main'294 steps:295 - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6296 - uses: ./.github/actions/perf-measures297 with:298 target-ref: 'main'