-
Notifications
You must be signed in to change notification settings - Fork 2
82 lines (60 loc) · 1.74 KB
/
Copy pathci.yml
File metadata and controls
82 lines (60 loc) · 1.74 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
rust:
name: Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt, llvm-tools-preview
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --workspace && cargo build -p sheetkit --features cli
- name: Clippy
run: cargo clippy --workspace -- -D warnings && cargo clippy -p sheetkit --features cli -- -D warnings
- name: Format check
run: cargo fmt --check
- uses: taiki-e/install-action@cargo-llvm-cov
- name: Test with coverage
run: cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Test CLI
run: cargo test -p sheetkit --features cli
- name: Upload coverage artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: rust-coverage
path: lcov.info
retention-days: 7
node:
name: Node.js
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
shared-key: node-rust
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Biome check
run: pnpm check
- name: Build (napi + typecheck + tsdown)
run: pnpm --filter @sheetkit/node build
- name: Test
run: pnpm test