ruff-pre-commit/.github/workflows/main.yml
Ali Hamdan 89791c7aee
Add jupyter and toml file types (#44)
## Summary

Add `jupyter` to the file types that ruff pre-commit hook runs on

## Test Plan

This is what pre-commit uses to identify ".ipynb" files. See
dc75a76b7f/identify/extensions.py (L100)
Also black does this
https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml

Fixes #43
2023-07-09 15:37:19 -04:00

38 lines
1.1 KiB
YAML

name: main
on:
schedule:
- cron: "0 */4 * * *"
workflow_dispatch:
repository_dispatch:
types: [ pypi_release ]
jobs:
build:
name: main
runs-on: ubuntu-latest
steps:
- if: ${{ startsWith(github.event_name, 'repository_dispatch') }}
run: sleep 30
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.x"
- run: pip install pre-commit-mirror-maker
- name: set git config
run: |
git config user.name 'Github Actions'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
- run: pre-commit-mirror --language python --package-name ruff --entry 'ruff check --force-exclude' --id ruff --types-or python --types-or pyi --types-or jupyter --types-or toml --require-serial --description "Run 'ruff' for extremely fast Python linting" .
- run: git push origin HEAD:refs/heads/main --tags
- name: "Update version in README.md"
run: python update_version.py
- run: git push origin HEAD:refs/heads/main