Repository navigation
70 lines (64 loc) · 2.17 KB
/
Copy pathci.yml
File metadata and controls
70 lines (64 loc) · 2.17 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
name: CI
# Build + test the published packages on every PR and every push to main.
# Release/publishing lives in release.yml (tag-triggered).
on:
pull_request:
push:
branches: [main]
# One in-flight run per ref; new pushes cancel the old run.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust — clippy + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# postgres/mysql are pure-Rust drivers, so --all-features compiles without
# system DB client libs. Their live tests self-skip when the *_URL env
# vars are absent, so they don't need a server here.
- name: Clippy (warnings fail the build)
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Test
run: cargo test --workspace --all-features
node:
name: Node — build napi addon + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Build + test @powder/node
working-directory: crates/powder-node
run: |
npm install
npm run build:debug # debug is enough for a CI smoke check
npm test
python:
name: Python — build + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Build + test powder (python)
working-directory: crates/powder-python
run: |
python -m venv .venv # maturin develop requires an active venv
source .venv/bin/activate
pip install --upgrade pip maturin pytest
maturin develop
pytest tests
# NOTE: no docs job — docs-site/ is intentionally .gitignored (deployed from a
# separate server), so CI has nothing to build there.