Skip to content

Merge pull request #4022 from Unidata/dependabot-github_actions-dot-g… #45

Merge pull request #4022 from Unidata/dependabot-github_actions-dot-g…

Merge pull request #4022 from Unidata/dependabot-github_actions-dot-g… #45

Workflow file for this run

name: Linting
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint:
name: Run Lint Tools
runs-on: ubuntu-slim
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.x
cache: 'pip'
cache-dependency-path: 'ci-dev/linting_requirements.txt'
- name: Install linting tools
run: python -m pip install -r ci-dev/linting_requirements.txt
- name: Set up reviewdog
uses: reviewdog/action-setup@d8a7baabd7f3e8544ee4dbde3ee41d0011c3a93f # v1.5.0
- name: Run ruff
run: ruff check --output-format github
- name: Run flake8
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
flake8 | reviewdog -f=pep8 -name=flake8 -reporter=github-check -filter-mode=nofilter
- name: Run doc8
# Don't skip doc8 if flake8 fails
if: always()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
doc8 docs | reviewdog -efm='%f:%l: %m' -name=doc8 -reporter=github-check -filter-mode=nofilter
- name: Run codespell
# Don't skip codespell if any other steps fail
if: always()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -o pipefail
codespell | reviewdog -efm='%f:%l: %m' -name=codespell -reporter=github-check -filter-mode=nofilter
- name: Check static data registry
# Don't skip if any other steps fail
if: always()
run: |
python -c "import pooch; pooch.make_registry('staticdata', 'src/metpy/static-data-manifest.txt')"
git diff --exit-code