feat: enhance AI configuration and integrate idea management features #37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| # JavaScript tests (only on macOS - JS code is platform-independent) | |
| test-js: | |
| name: Test JS | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: crates/opencontext-node -> target | |
| - name: Install Protobuf | |
| run: brew install protobuf | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build native module (debug for faster builds) | |
| run: | | |
| cd crates/opencontext-node | |
| npm ci | |
| npm run build:debug | |
| - name: Run JS tests | |
| run: npm test | |
| # Rust tests | |
| test-rust: | |
| name: Test Rust | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: crates/opencontext-core -> target | |
| - name: Install Protobuf | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Run Rust tests | |
| run: | | |
| cd crates/opencontext-core | |
| cargo test --release --features search | |
| # Lint | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache Rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: crates/opencontext-core -> target | |
| - name: Install Protobuf | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Check Rust formatting | |
| run: | | |
| cd crates/opencontext-core | |
| cargo fmt --check | |
| - name: Run Clippy | |
| run: | | |
| cd crates/opencontext-core | |
| cargo clippy --features search -- -D warnings | |