-"name: Testing\n\non:\n push:\n branches:\n - main\n pull_request:\nenv:\n CARGO_TERM_COLOR: always\n RUST_BACKTRACE: 1\n RUSTFLAGS: \"-D warnings\"\n PYTHON_VERSION: \"3.9\"\njobs:\n clippy:\n name: Clippy\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install Rust\n run: |\n curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo clippy\n run: cargo clippy --all-targets -- --deny warnings\n fmt:\n name: Rustfmt\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install Rust\n run: |\n curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y\n - name: Cache dependencies\n uses: Swatinem/rust-cache@v2\n - name: Run cargo fmt\n run: cargo fmt --all -- --check\n python-linting:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n uses: astral-sh/setup-uv@v3\n with:\n enable-cache: true\n - name: Set up Python\n uses: actions/setup-python@v5\n with:\n python-version: ${{ env.PYTHON_VERSION }}\n - name: Install Dependencies\n run: |\n run: uv sync --frozen\n maturin build --out dist\n - name: Ruff format check\n run: uv run ruff format my_project tests --check\n - name: Lint with ruff\n run: uv run ruff check .\n - name: mypy check\n run: uv run mypy my_project tests\n testing:\n strategy:\n fail-fast: false\n matrix:\n python-version: [\"3.9\", \"3.10\", \"3.11\", \"3.12\"]\n os: [ubuntu-latest, windows-latest, macos-latest]\n runs-on: ${{ matrix.os }}\n steps:\n - uses: actions/checkout@v4\n - name: Install uv\n uses: astral-sh/setup-uv@v3\n with:\n enable-cache: true\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions/setup-python@v5\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install Dependencies\n run: |\n uv sync --frozen\n uv run maturin build\n - name: Test with pytest\n run: uv run pytest\n"
0 commit comments