Skip to content

build: replace Yarn/Vitest with Bun #162

build: replace Yarn/Vitest with Bun

build: replace Yarn/Vitest with Bun #162

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
node: [20]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build the library
run: bun prepack
- name: Run unit tests
run: bun test:unit
- name: Run snapshot tests
run: bun test:snapshot
# Only trigger deploy if previous steps pass and branch is main
- name: Deploy docs
if: matrix.os == 'macos-latest' && github.ref == 'refs/heads/main'
env:
deploy_url: ${{ secrets.RENDER_DEPLOY_HOOK_URL }}
run: curl "$deploy_url"