-
Notifications
You must be signed in to change notification settings - Fork 15
41 lines (33 loc) · 960 Bytes
/
Copy pathci.yml
File metadata and controls
41 lines (33 loc) · 960 Bytes
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
name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
# Always-run: build + type-check + surface-level tests + tarball validation.
# No network calls to YouTube — works on any runner.
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm run build
# Tests are split: surface-level tests run here; live-network tests
# are gated by YOUTUBE_LIVE=1 (see live-check.yml).
- run: npm test
- name: Verify published tarball contents
run: |
npm pack --dry-run 2>&1 | tee pack-output.txt
grep -q "dist/index.js" pack-output.txt
grep -q "dist/index.d.ts" pack-output.txt