2021-12-29 22:58:51 +01:00
|
|
|
name: ci
|
|
|
|
on:
|
|
|
|
push:
|
2024-05-29 11:09:22 +02:00
|
|
|
branches: [main, next]
|
2021-12-29 22:58:51 +01:00
|
|
|
pull_request:
|
2022-05-05 02:35:44 +02:00
|
|
|
branches: ['*']
|
2024-05-29 10:10:03 +02:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- '.vscode/**'
|
|
|
|
- 'README.md'
|
|
|
|
- '.gitignore'
|
|
|
|
- 'LICENSE'
|
2021-12-29 22:58:51 +01:00
|
|
|
|
|
|
|
jobs:
|
2024-05-31 21:17:47 +02:00
|
|
|
coverage:
|
|
|
|
name: 'Coverage'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
|
|
|
# bun excluded because it uses built-in test tool which does not support coverage in v8/istanbul format.
|
|
|
|
# refer https://github.com/oven-sh/bun/issues/4015
|
|
|
|
- main
|
|
|
|
- fastly
|
|
|
|
- node
|
2024-06-02 15:49:40 +02:00
|
|
|
- workerd
|
2024-05-31 21:17:47 +02:00
|
|
|
- lambda
|
|
|
|
- lambda-edge
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/download-artifact@v4
|
|
|
|
with:
|
|
|
|
pattern: coverage-*
|
|
|
|
merge-multiple: true
|
|
|
|
path: ./coverage
|
|
|
|
- uses: codecov/codecov-action@v4
|
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|
|
|
|
directory: ./coverage
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
|
2023-08-28 14:52:25 +02:00
|
|
|
main:
|
2023-03-06 13:12:22 +01:00
|
|
|
name: 'Main'
|
2021-12-29 22:58:51 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-13 00:47:39 +02:00
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '20.x'
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
2022-05-05 02:35:44 +02:00
|
|
|
with:
|
2024-01-29 15:27:54 +01:00
|
|
|
bun-version: '1.0.25'
|
|
|
|
- run: bun install
|
|
|
|
- run: bun run format
|
|
|
|
- run: bun run lint
|
|
|
|
- run: bun run build
|
|
|
|
- run: bun run test
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: coverage-main
|
|
|
|
path: coverage/
|
2022-07-13 01:25:36 +02:00
|
|
|
|
2024-05-24 10:47:28 +02:00
|
|
|
jsr-dry-run:
|
|
|
|
name: "Checking if it's valid for JSR"
|
2023-08-28 14:52:25 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-05-24 10:47:28 +02:00
|
|
|
- uses: denoland/setup-deno@v1
|
2024-03-16 13:01:35 +01:00
|
|
|
with:
|
2024-05-24 10:47:28 +02:00
|
|
|
deno-version: v1.x
|
|
|
|
- run: deno publish --dry-run
|
2023-08-28 14:52:25 +02:00
|
|
|
|
2022-07-13 01:25:36 +02:00
|
|
|
deno:
|
2023-01-07 01:55:42 +01:00
|
|
|
name: 'Deno'
|
2022-07-13 01:25:36 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-07-13 01:25:36 +02:00
|
|
|
- uses: denoland/setup-deno@v1
|
|
|
|
with:
|
|
|
|
deno-version: v1.x
|
2024-05-31 21:17:47 +02:00
|
|
|
- run: env NAME=Deno deno test --coverage=coverage/raw/deno-runtime --allow-read --allow-env --allow-write -c runtime_tests/deno/deno.json runtime_tests/deno
|
|
|
|
- run: deno test -c runtime_tests/deno-jsx/deno.precompile.json --coverage=coverage/raw/deno-precompile-jsx runtime_tests/deno-jsx
|
|
|
|
- run: deno test -c runtime_tests/deno-jsx/deno.react-jsx.json --coverage=coverage/raw/deno-react-jsx runtime_tests/deno-jsx
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: coverage-deno
|
|
|
|
path: coverage/
|
2022-07-13 14:24:08 +02:00
|
|
|
|
|
|
|
bun:
|
2023-01-07 01:55:42 +01:00
|
|
|
name: 'Bun'
|
2022-07-13 14:24:08 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-17 08:56:09 +02:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
2023-06-27 11:14:06 +02:00
|
|
|
with:
|
2024-01-29 15:27:54 +01:00
|
|
|
bun-version: '1.0.25'
|
2023-05-17 08:56:09 +02:00
|
|
|
- run: bun run test:bun
|
2022-12-24 17:42:59 +01:00
|
|
|
|
2023-01-07 01:17:41 +01:00
|
|
|
fastly:
|
2023-11-16 08:36:28 +01:00
|
|
|
name: 'Fastly Compute'
|
2023-01-07 01:17:41 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- run: bun install
|
|
|
|
- run: bun run build
|
|
|
|
- run: bun run test:fastly
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: coverage-fastly
|
|
|
|
path: coverage/
|
2023-01-07 01:17:41 +01:00
|
|
|
|
2023-01-07 10:50:45 +01:00
|
|
|
node:
|
2023-10-20 08:21:38 +02:00
|
|
|
name: 'Node.js v${{ matrix.node }}'
|
2023-01-07 10:50:45 +01:00
|
|
|
runs-on: ubuntu-latest
|
2023-10-20 08:21:38 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-29 10:34:49 +02:00
|
|
|
node: ['18.18.2', '20.x', '22.x']
|
2023-01-07 10:50:45 +01:00
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-01 16:12:49 +01:00
|
|
|
- uses: actions/setup-node@v4
|
2023-01-07 10:50:45 +01:00
|
|
|
with:
|
2023-11-01 16:12:49 +01:00
|
|
|
node-version: ${{ matrix.node }}
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- run: bun install
|
|
|
|
- run: bun run build
|
|
|
|
- run: bun run test:node
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
if: matrix.node == '22.x'
|
|
|
|
with:
|
|
|
|
name: coverage-node
|
|
|
|
path: coverage/
|
2023-03-06 13:12:22 +01:00
|
|
|
|
2024-06-02 15:49:40 +02:00
|
|
|
workerd:
|
|
|
|
name: 'workerd'
|
2023-03-06 13:12:22 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-06-02 15:49:40 +02:00
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '20.x'
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- run: bun install
|
|
|
|
- run: bun run build
|
2024-06-02 15:49:40 +02:00
|
|
|
- run: bun run test:workerd
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
2024-06-02 15:49:40 +02:00
|
|
|
name: coverage-workerd
|
2024-05-31 21:17:47 +02:00
|
|
|
path: coverage/
|
2023-03-17 08:33:54 +01:00
|
|
|
|
|
|
|
lambda:
|
|
|
|
name: 'AWS Lambda'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- run: bun install
|
|
|
|
- run: bun run build
|
|
|
|
- run: bun run test:lambda
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: coverage-lambda
|
|
|
|
path: coverage/
|
2023-07-07 10:41:33 +02:00
|
|
|
|
|
|
|
lambda-edge:
|
|
|
|
name: 'Lambda@Edge'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 08:37:04 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-01-29 15:27:54 +01:00
|
|
|
- uses: oven-sh/setup-bun@v1
|
|
|
|
- run: bun install --frozen-lockfile
|
|
|
|
- run: bun run build
|
|
|
|
- run: bun run test:lambda-edge
|
2024-05-31 21:17:47 +02:00
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
name: coverage-lambda-edge
|
|
|
|
path: coverage/
|