-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (73 loc) · 1.97 KB
/
ci.yml
File metadata and controls
89 lines (73 loc) · 1.97 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on:
pull_request:
branches: ["main"]
release:
types: ["published"]
workflow_dispatch: {}
jobs:
test:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run tests (with coverage)
run: bun run test
- name: Upload coverage (if generated)
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage
bench:
name: Run benchmarks
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run benchmarks
run: |
bun run bench | tee bench-output.txt
- name: Upload bench output
uses: actions/upload-artifact@v4
with:
name: bench-output
path: bench-output.txt
memory-check:
name: Run memory check
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run memory check
run: |
bun run memory-check | tee memory-check-output.txt
- name: Upload memory check output
uses: actions/upload-artifact@v4
with:
name: memory-check-output
path: memory-check-output.txt