Derive macro for rich enums #564
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: 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 Environment | |
uses: ./.github/actions/setup-test-environment | |
- 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 Environment | |
uses: ./.github/actions/setup-test-environment | |
- 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 Environment | |
uses: ./.github/actions/setup-test-environment | |
- 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 Environment | |
uses: ./.github/actions/setup-test-environment | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
stub-gen: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
crate: | |
- pure | |
- mixed | |
- mixed_sub | |
- mixed_sub_multiple | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Environment | |
uses: ./.github/actions/setup-test-environment | |
- name: Generate stub file | |
run: task ${{ matrix.crate}}:stub-gen | |
- 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 |