New TypeInfo
struct and PyStubType
trait
#157
Workflow file for this run
This file contains 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: Rust | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
doc-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Check warnings in documents | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --no-deps | |
env: | |
RUSTDOCFLAGS: -D warnings | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Check with clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
args: --all-features -- -D warnings | |
token: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
stub-gen: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
crate: | |
- pyo3-stub-gen-testing-pure | |
- pyo3-stub-gen-testing-mixed | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: clippy | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Generate stub file | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --bin stub_gen -p ${{ matrix.crate }} | |
- name: Check if stub file is up to date | |
run: git diff --exit-code | |
semver-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
with: | |
package: pyo3-stub-gen, pyo3-stub-gen-derive |