ci: unit tests under deno
This commit is contained in:
parent
b418577bfa
commit
132c90ed94
2 changed files with 20 additions and 20 deletions
16
.github/actions/init-bun/action.yml
vendored
16
.github/actions/init-bun/action.yml
vendored
|
@ -1,16 +0,0 @@
|
||||||
inputs:
|
|
||||||
bun-version:
|
|
||||||
default: '1.0.32'
|
|
||||||
|
|
||||||
runs:
|
|
||||||
using: 'composite'
|
|
||||||
steps:
|
|
||||||
- name: Use Bun ${{ inputs.bun-version }}
|
|
||||||
uses: oven-sh/setup-bun@v1
|
|
||||||
with:
|
|
||||||
bun-version: ${{ inputs.bun-version }}
|
|
||||||
- run: bun install # can't re-use pnpm-lock, see https://github.com/oven-sh/bun/issues/7157
|
|
||||||
shell: bash
|
|
||||||
- name: 'TL codegen'
|
|
||||||
run: bun run packages/tl/scripts/gen-code.ts
|
|
||||||
shell: bash
|
|
22
.github/workflows/test.yaml
vendored
22
.github/workflows/test.yaml
vendored
|
@ -50,12 +50,28 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: ./.github/actions/init
|
- uses: ./.github/actions/init
|
||||||
- uses: ./.github/actions/init-bun
|
- uses: oven-sh/setup-bun@v1
|
||||||
|
with:
|
||||||
|
bun-version: '1.1.4'
|
||||||
- name: 'Build tests'
|
- name: 'Build tests'
|
||||||
run: pnpm exec vite build -c .config/vite.bun.mts
|
run: pnpm exec vite build -c .config/vite.bun.mts
|
||||||
- name: 'Run tests'
|
- name: 'Run tests'
|
||||||
run: cd dist/tests && bun test
|
run: cd dist/tests && bun test
|
||||||
|
|
||||||
|
test-deno:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: lint
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/init
|
||||||
|
- uses: denoland/setup-deno@v1
|
||||||
|
with:
|
||||||
|
deno-version: 2f5a6a8514ad8eadce1a0a9f1a7a419692e337ef
|
||||||
|
- name: 'Build tests'
|
||||||
|
run: pnpm exec vite build -c .config/vite.deno.mts
|
||||||
|
- name: 'Run tests'
|
||||||
|
run: cd dist/tests && deno test
|
||||||
|
|
||||||
test-web:
|
test-web:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint
|
needs: lint
|
||||||
|
@ -78,7 +94,7 @@ jobs:
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-node, test-web, test-bun]
|
needs: [test-node, test-web, test-bun, test-deno]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: write
|
actions: write
|
||||||
|
@ -100,7 +116,7 @@ jobs:
|
||||||
run: cd e2e/node && ./cli.sh ci-publish
|
run: cd e2e/node && ./cli.sh ci-publish
|
||||||
e2e-deno:
|
e2e-deno:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [test-node, test-web, test-bun]
|
needs: [test-node, test-web, test-bun, test-deno]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: write
|
actions: write
|
||||||
|
|
Loading…
Reference in a new issue