Skip to content

Fix Windows CI via node+jest (as alternative to bun) #33

Fix Windows CI via node+jest (as alternative to bun)

Fix Windows CI via node+jest (as alternative to bun) #33

Workflow file for this run

name: Test
on: [push, pull_request, 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: 'jest' }
- { os: 'macos-12', tool: 'jest' }
- { os: 'windows-2022', tool: 'jest' }
runs-on: ${{ matrix.env.os }}
steps:
- uses: actions/checkout@v3
# Testing via `bun install` and `bun test`
- 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 via `npm install` and `jest`
- run: |
node -v && npm -v
npm install
npm install --no-save jest esbuild@^0.19.11
# https://jestjs.io/docs/ecmascript-modules
node --experimental-vm-modules node_modules/jest/bin/jest --coverage
if: ${{ matrix.env.tool == 'jest' }}