parse import statement to a Pyo3Import #8
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: Quick CI | |
# A short version of the CI, designed to run in seconds (<200s) on every push. | |
# Runs lints & basic tests on ALL branches EXCEPT main. | |
on: | |
push: | |
branches-ignore: | |
- main | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- run: python -m pip install --upgrade pip && pip install nox | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Check python formatting and lints (ruff) | |
run: nox -s ruff | |
- name: Check rust formatting (rustfmt) | |
run: nox -s rustfmt | |
semver-checks: | |
if: github.ref != 'refs/heads/main' | |
needs: [fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: obi1kenobi/cargo-semver-checks-action@v2 | |
clippy: | |
needs: [fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,rust-src | |
- uses: actions/setup-python@v5 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- run: python -m pip install --upgrade pip && pip install nox | |
- run: nox -s clippy | |
tests: | |
name: test rust skip-full | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
save-if: ${{ github.event_name != 'merge_group' }} | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rust-src | |
- run: python -m pip install --upgrade pip && pip install nox | |
- run: nox -s test-rust -- skip-full |