-
Notifications
You must be signed in to change notification settings - Fork 193
44 lines (41 loc) · 1.23 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
test:
strategy:
matrix:
env:
- { os: 'ubuntu-22.04', tool: 'bun' }
- { os: 'macos-12', tool: 'bun' }
# Windows support for bun install is not implemented yet
# - { os: 'windows-2022', tool: 'bun' }
# - { os: 'ubuntu-22.04', tool: 'node+jest' }
# - { os: 'macos-12', tool: 'node+jest' }
- { os: 'windows-2022', tool: 'node+jest' }
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v3
# Testing `bun`
- uses: oven-sh/setup-bun@v1
if: ${{ matrix.env.tool == 'bun' }}
- run: |
bun -v
bun install
bun install --no-save esbuild@^0.19.11
bun test --coverage
if: ${{ matrix.env.tool == 'bun' }}
# Testing `node+jest`
- run: |
node -v && npm -v
npm install
npm install --no-save jest jest-extended esbuild@^0.19.11
# https://jestjs.io/docs/ecmascript-modules
node --experimental-vm-modules node_modules/jest/bin/jest --runInBand --coverage
if: ${{ matrix.env.tool == 'node+jest' }}