Python-pyo3: add library interface #214
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: Python | |
# Run either when pushing directly to main/master or in a PR targeting main/master | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/ruff.yml" | |
- "**.py" | |
pull_request: | |
paths: | |
- ".github/workflows/ruff.yml" | |
- "**.py" | |
# Cancel previous runs for PRs but not pushes to main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Python environment | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ruff | |
- name: Ruff lint | |
run: ruff check --output-format=github ./python ./python-pyo3 | |
- name: Ruff format | |
run: ruff format --check --verbose ./python ./python-pyo3 |