[MNT] Add pre-commit, drop python 3.8, add python 3.12, add yamllint, add toml-sort #17
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: style | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
style: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --progress-bar off --upgrade pip setuptools | |
python -m pip install --progress-bar off .[style] | |
- name: Run isort | |
uses: isort/isort-action@master | |
- name: Run black | |
uses: psf/black@stable | |
with: | |
options: "--check --verbose" | |
- name: Run Ruff | |
run: ruff check pycrostates | |
- name: Run codespell | |
uses: codespell-project/actions-codespell@master | |
with: | |
check_filenames: true | |
check_hidden: true | |
skip: ./.git,./build,./.github,*.bib,./.mypy_cache,./.pytest_cache | |
ignore_words_file: ./.codespellignore | |
- name: Run pydocstyle | |
run: pydocstyle . | |
- name: Run bibclean | |
run: bibclean-check docs/references.bib | |
- name: Run toml-sort | |
run: toml-sort pyproject.toml --check | |
- name: Run yamllint | |
run: yamllint . -c .yamllint.yaml --strict |