-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (76 loc) · 2.39 KB
/
Copy pathci.yml
File metadata and controls
84 lines (76 loc) · 2.39 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
name: CI
on:
push:
branches: [main, develop, next]
pull_request:
branches: [main, develop, next]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
# Opt every JS-based action into Node 24 ahead of GitHub's forced
# migration (Sep 2026). Kills the per-step "Node 20 is deprecated"
# warnings from actions/checkout, setup-node, pnpm/action-setup, etc.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
# Cargo / Rust jobs run directly here rather than through the org's
# nx-ci.yml because Nx's affected-projects logic is overkill for a
# single-crate workspace. The project.json wires `nx run mcp2cli:lint
# | test | build` to the same commands if you want to drive them
# locally via Nx; CI just calls cargo directly for clarity.
jobs:
lint:
name: Lint (fmt + clippy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo
uses: Swatinem/rust-cache@v2
- name: cargo fmt --check
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --all-targets --all-features -- -D warnings
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}
- name: cargo test
run: cargo test --all-features --locked
build:
name: Build (release profile)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: cargo build --release
run: cargo build --release --locked
site:
name: Site build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: site/pnpm-lock.yaml
- name: Install deps
working-directory: site
run: pnpm install --frozen-lockfile
- name: Build
working-directory: site
run: pnpm build