-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (65 loc) · 1.96 KB
/
Copy pathci.yml
File metadata and controls
81 lines (65 loc) · 1.96 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
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Check, test, build, and pack
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Setup Bun
uses: oven-sh/setup-bun@v2.2.0
with:
bun-version: latest
- name: Setup Node.js
uses: actions/setup-node@v6.4.0
with:
node-version: 24
package-manager-cache: false
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Verify package
run: bun run verify
- name: Smoke test built entrypoints
run: |
node --input-type=module -e "const m = await import('./dist/index.mjs'); if (typeof m.createClient !== 'function') throw new Error('missing ESM createClient')"
node -e "const m = require('./dist/index.cjs'); if (typeof m.createClient !== 'function') throw new Error('missing CJS createClient')"
- name: Verify npm package contents
run: npm pack --dry-run --json
- name: Pack artifact
if: github.event_name != 'pull_request'
run: npm pack --json
- name: Upload package artifact
if: github.event_name != 'pull_request'
uses: actions/upload-artifact@v7.0.1
with:
name: npm-package
path: "*.tgz"
if-no-files-found: error
retention-days: 7
dependency-review:
name: Dependency review
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event_name == 'pull_request'
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Review dependency changes
uses: actions/dependency-review-action@v5.0.0