Repository navigation
51 lines (48 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
51 lines (48 loc) · 1.57 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install --frozen-lockfile
- run: bunx tsc --noEmit
- run: bun test
# What a user actually gets, on every platform they get it on.
#
# The job above runs the code out of the working tree, where every file
# exists whether or not `package.json` ships it. A file left out of `files`
# is invisible until someone installs the package and a search quietly finds
# nothing. So this packs the tarball, installs it, and drives the installed
# copy — loading the extension through jiti the way pi does.
#
# macOS appears here and not in the matrix above deliberately: this is the
# job that answers "does it work when installed", and that is the question
# that is genuinely per-platform.
install:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# Installs the peer packages that pi supplies at runtime; without them
# the installed extension cannot resolve its own imports.
- run: bun install --frozen-lockfile
- run: node test/install-check.mjs