Signature #147
Workflow file for this run
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] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| guard: | |
| name: Guard | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'chore: release')" | |
| steps: | |
| - run: "true" | |
| test-rust: | |
| name: Rust Tests | |
| runs-on: ubuntu-latest | |
| needs: guard | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --workspace | |
| test-node: | |
| name: Node.js Tests (${{ matrix.os }}) | |
| needs: test-rust | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Install dependencies | |
| working-directory: packages/langmail | |
| run: npm install | |
| - name: Build native module | |
| working-directory: packages/langmail | |
| run: npm run build | |
| - name: Check index.js is up to date | |
| if: matrix.os == 'ubuntu-latest' | |
| working-directory: packages/langmail | |
| run: git diff --exit-code index.js index.d.ts | |
| - name: Run tests | |
| working-directory: packages/langmail | |
| run: npm test | |
| test-python: | |
| name: Python Tests (${{ matrix.os }}) | |
| needs: test-rust | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Set up virtualenv | |
| run: | | |
| python -m venv .venv | |
| echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH | |
| echo "${{ github.workspace }}/.venv/Scripts" >> $GITHUB_PATH | |
| echo "VIRTUAL_ENV=${{ github.workspace }}/.venv" >> $GITHUB_ENV | |
| - run: pip install maturin pytest | |
| - name: Build and install | |
| working-directory: crates/langmail-python | |
| run: maturin develop | |
| - run: pytest crates/langmail-python/tests/ -v | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| needs: guard | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fmt --all -- --check | |
| - run: cargo clippy --workspace -- -D warnings |