Merge pull request #135 from Azure-Samples/python39 #248
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 code quality | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- '**.py' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- '**.py' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
checks-format-and-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install ruff | |
- name: Lint with ruff | |
run: ruff check . | |
- name: Check formatting with ruff | |
run: ruff format . --check |