mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
49 lines
1.0 KiB
YAML
49 lines
1.0 KiB
YAML
name: Lint source code
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
FORCE_COLOR: 1
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
tool: [docslint, flake8, isort, mypy, twine]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3
|
|
- name: Install dependencies
|
|
run: python -m pip install -U tox pip
|
|
- name: Run Tox
|
|
run: tox -e ${{ matrix.tool }}
|
|
|
|
ruff:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install --upgrade ruff
|
|
- name: Lint with Ruff
|
|
run: ruff . --diff --format github
|