Use linters and formatters #3
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: build | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "3.8", "3.10", "3.12" ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Install the project | |
run: uv sync --all-extras --dev | |
- name: Run tests | |
run: uv run pytest tests | |
- name: Run pylint | |
run: uv run pylint apispec_flask_restful tests | |
- name: Install tools | |
run: uv tool install black isort | |
- name: Run black | |
run: uv tool run black --check . | |
- name: Run isort | |
run: uv tool run isort --check-only . |