0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-22 11:17:33 +01:00
hono/.github/workflows/ci.yml
watany 76a2c7f523
chore(ci): bun v1 (#1599)
* chore(ci): bun v1

* bun use jsx

* bun version
2023-10-20 18:18:05 +09:00

136 lines
3.2 KiB
YAML

name: ci
on:
push:
branches: [main, next]
pull_request:
branches: ['*']
jobs:
main:
name: 'Main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20.x
- run: yarn install --frozen-lockfile
- run: npm run format
- run: npm run lint
- run: npm run build
- run: NODE_OPTIONS="--no-warnings" npm test
denoify:
name: "Checking if you've done denoify"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: |
npm run denoify
if [[ `git status --porcelain` ]]; then
exit 1
fi
deno:
name: 'Deno'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: env NAME=Deno deno test --allow-read --allow-env runtime_tests/deno
bun:
name: 'Bun'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: '1.0.6'
- run: bun run test:bun
fastly:
name: 'Fastly Compute@Edge'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm run test:fastly
lagon:
name: 'Lagon'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm i -g @lagon/cli@latest esbuild@latest
- run: npm run test:lagon
node:
name: 'Node.js v${{ matrix.node }}'
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18.18.2', '20.x']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm run test:node
wrangler:
name: 'Cloudflare Workers'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm run test:wrangler
lambda:
name: 'AWS Lambda'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm run test:lambda
lambda-edge:
name: 'Lambda@Edge'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npm run build
- run: npm run test:lambda-edge