CI: fixes and updates to pre-commit workflow for linting pass #345
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: Linting | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# default (from docs) is just on [opened, synchronize, reopened] | |
types: [opened, reopened, ready_for_review, edited] | |
branches: | |
- main | |
# Note: only running this on Ubuntu (latest) and Python 3.8 as representative, | |
# since the linting output should be machine dependent and not vary much if | |
# at all by Python minor version. | |
jobs: | |
# Lint against selected pre-commit hooks (see https://pre-commit.com | |
# and https://github.com/pre-commit/action). | |
# *The config. applied here is from our .pre-commit-config.yaml* | |
# | |
# Note the pre-commit linting includes all of the other linters configured | |
# to run as pre-commit hooks, namely black, flake8 and docformatter etc., | |
# so there is no need to set these up individually! | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- uses: pre-commit/[email protected] |