Voltage Park migration -- set up workflows and pre-commit #1
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Auto-fix with ruff | |
| run: | | |
| ruff check --fix . | |
| ruff format . | |
| - name: Commit ruff fixes | |
| uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| commit_message: "Auto-commit ruff fixes [skip ci]" | |
| commit_username: "Autoformatter" | |
| commit_email: "Autoformatter <actions@github.com>" | |
| mypy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install mypy and stubs | |
| run: pip install mypy pandas-stubs | |
| - name: Run mypy | |
| run: mypy src/ |