Lint #246
Workflow file for this run
This file contains hidden or 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: "Lint" | |
| # Run these these whenever ... | |
| on: | |
| pull_request: # ... a PR is opened / updated | |
| merge_group: # ... the PR is added to the merge queue | |
| push: | |
| branches: | |
| - main # ... when merging into the main branch | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup Python 3.11 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| # Only restore (don't save) caches on PRs. New caches created from PRs won't be | |
| # accessible from other PRs, see workflows/create_cache.yaml. | |
| - uses: actions/cache/restore@v5 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Install pre-commit | |
| run: pip install pre-commit | |
| - name: Run lint via pre-commit | |
| run: pre-commit run --all-files | |
| - name: Check advection code consistency | |
| run: | | |
| ./.github/workflows/scripts/ensure_xppm_yppm_consistency.sh |