-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (69 loc) · 2.51 KB
/
Copy pathci.yml
File metadata and controls
86 lines (69 loc) · 2.51 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
86
name: CI
on:
push:
branches: [main]
pull_request:
# Cancel superseded runs on the same ref.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build & test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
crates/random-input-generator/target
key: cargo-${{ runner.os }}-${{ hashFiles('crates/random-input-generator/Cargo.lock') }}
- name: Install wasm-pack
uses: jetli/wasm-pack-action@v0.4.0
with:
version: latest
- name: Set up pnpm
uses: pnpm/action-setup@v6
- name: Set up Node
uses: actions/setup-node@v7
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
# WASM must be built before any step that consumes it.
- name: Build generator WASM
run: pnpm build:wasm
# Default features first: this is the exact configuration wasm-pack
# ships (faker off), incl. the cfg(not(feature = "faker")) rejection test.
- name: Test Rust crate
run: cargo test
working-directory: crates/random-input-generator
# --all-features: the feature-gated faker paths (incl. its distinct
# rejection) are otherwise never compiled or run in CI.
- name: Test Rust crate (all features)
run: cargo test --all-features
working-directory: crates/random-input-generator
# Release + default features is the exact shipping configuration
# (wasm-pack builds release with faker off). AC-C1-5 requires the
# error-path fixtures to run at least once against a release-config
# build; this also guards against future debug-only assertions and is
# the only config where the Q3 performance tests run.
- name: Test Rust crate (release)
run: cargo test --release
working-directory: crates/random-input-generator
- name: Test Rust crate (release, all features)
run: cargo test --release --all-features
working-directory: crates/random-input-generator
- name: Build packages
run: pnpm -r build
- name: Typecheck packages
run: pnpm -r typecheck
- name: Test packages
run: pnpm -r test