-
Notifications
You must be signed in to change notification settings - Fork 183
55 lines (50 loc) · 1.37 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
45
46
47
48
49
50
51
52
53
54
55
name: Test
on:
push:
branches:
- master
paths:
- packages/**
paths-ignore:
- packages/examples/**
- packages/nuejs.org/**
pull_request:
paths:
- packages/**
paths-ignore:
- packages/examples/**
- packages/nuejs.org/**
workflow_dispatch:
jobs:
test:
if: ${{ github.repository_owner == 'nuejs' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
tool: ['bun', 'node+jest']
exclude:
- { os: 'ubuntu-latest', tool: 'node+jest' }
- { os: 'macos-latest', tool: 'node+jest' }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# Testing `bun`
- uses: oven-sh/setup-bun@v2
if: ${{ matrix.tool == 'bun' }}
- name: Install and test with Bun
run: |
bun -v
bun install
bun install --no-save esbuild
bun test --coverage
if: ${{ matrix.tool == 'bun' }}
# Testing `node+jest`
- uses: actions/setup-node@v4
if: ${{ matrix.tool == 'node+jest' }}
- name: Install and test with Node
run: |
node -v && npm -v
npm install
npm install --no-save jest jest-extended esbuild
npm test -- --coverage
if: ${{ matrix.tool == 'node+jest' }}