-
Notifications
You must be signed in to change notification settings - Fork 11
85 lines (68 loc) · 2.22 KB
/
ci.yml
File metadata and controls
85 lines (68 loc) · 2.22 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
name: CI
on:
push:
pull_request:
jobs:
quality:
name: Quality checks (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["20.x", "24.x"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm run lint
- name: Typecheck
run: pnpm run typecheck
- name: Unit tests
run: pnpm run test:unit
- name: Integration tests
run: pnpm run test:integration
- name: Build package
run: pnpm run build
- name: Ensure bundled LAME binary
env:
LAME_FORCE_DOWNLOAD: "1"
run: node ./scripts/install-lame.mjs
- name: Diagnose bundled LAME binary
run: node ./scripts/diagnose-lame.mjs
- name: Run examples
run: |
pnpm run example:wav-to-mp3
pnpm run example:mp3-to-wav
pnpm run example:stream
postinstall:
name: LAME install on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: quality
if: github.ref_name != 'master'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: pnpm
- name: Install dependencies (runs postinstall)
env:
LAME_FORCE_DOWNLOAD: "1"
run: pnpm install --frozen-lockfile