py2pyd 0.1.2

A Rust-based tool to compile Python modules to pyd files
name: CI

on:
  pull_request:
    branches: [main]
  push:
    branches: [main]

permissions:
  contents: read
  actions: read
  security-events: write

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  ci:
    runs-on: ubuntu-latest
    container: ghcr.io/loonghao/rust-toolkit:base
    steps:
      - uses: actions/checkout@v4

      - name: Check Rust version
        run: |
          echo "๐Ÿฆ€ Checking Rust version for malachite compatibility..."
          rustc --version
          echo "๐Ÿ“ฆ Cargo version:"
          cargo --version
        shell: bash

      - name: Check formatting
        shell: bash
        run: |
          echo "๐ŸŽจ Checking code formatting..."
          cargo fmt --all --check

      - name: Run clippy
        shell: bash
        run: |
          echo "๐Ÿ“Ž Running clippy lints..."
          cargo clippy --all-targets --all-features -- -D warnings -A clippy::too_many_lines -A clippy::uninlined_format_args -A clippy::format_push_string

      - name: Check documentation
        shell: bash
        env:
          RUSTDOCFLAGS: -D warnings
        run: |
          echo "๐Ÿ“š Checking documentation..."
          cargo doc --no-deps --document-private-items --workspace

      - name: Run tests
        shell: bash
        run: |
          echo "๐Ÿงช Running tests..."
          cargo test --verbose --workspace