-
Notifications
You must be signed in to change notification settings - Fork 10
68 lines (64 loc) · 2.22 KB
/
Copy pathci.yml
File metadata and controls
68 lines (64 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --workspace
js-package:
name: npm package (CLI and browser SDK)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: actions/setup-node@v4
with:
# The Vite consumer smoke test drives Vite 7, which needs >= 20.19.
node-version: 20.19
cache: npm
cache-dependency-path: packages/deckprobe-js/package-lock.json
- name: Install JavaScript dependencies
working-directory: packages/deckprobe-js
run: npm ci
- name: Build WASM and TypeScript package
working-directory: packages/deckprobe-js
run: npm run build
- name: Build the native CLI the launcher wraps
run: cargo build --locked --release -p deckprobe
- name: Install Chromium
working-directory: packages/deckprobe-js
run: npx playwright install --with-deps chromium
# test:public omits test:node and test:cli, which read tests/fixtures/local.
# That tree is private and promote-release.sh removes it from this
# repository, so `npm test` can never pass here. Both suites still run
# against the development tree, where the fixtures exist.
- name: Run contract, bundler, and CLI parity tests
working-directory: packages/deckprobe-js
run: npm run test:public
- name: Audit JavaScript dependencies
working-directory: packages/deckprobe-js
run: npm audit --audit-level=high
- name: Verify package contents
working-directory: packages/deckprobe-js
run: npm pack --dry-run --json