-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (53 loc) · 1.53 KB
/
ci.yml
File metadata and controls
68 lines (53 loc) · 1.53 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
# Build + Test
# Validates every contribution before merge
name: CI
on:
push:
branches: [next, feat/**, agent/**, research/**, hotfix/**]
pull_request:
branches: [main, next]
merge_group:
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
python-version: [3.11]
rust: [stable]
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Rust Cache
uses: swatinem/rust-cache@v2
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install JS deps
run: |
if [ -f package.json ]; then npm install; fi
- name: Install Python deps
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build Rust
run: |
if [ -f Cargo.toml ]; then cargo build --verbose; fi
- name: Run Rust tests
run: |
if [ -f Cargo.toml ]; then cargo test --verbose; fi
- name: Run JS tests
run: |
if [ -f package.json ]; then npm test || true; fi
- name: Run Python tests
run: |
if [ -d tests ]; then pytest || true; fi