Add explicitly listed artifacts to sources #376
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: precommit | |
| on: [push, pull_request] | |
| jobs: | |
| precommit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache pre-commit # taken from https://github.com/pre-commit/action/blob/main/action.yml | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Setup virtual environment | |
| run: uv sync | |
| - name: Install pre-commit | |
| run: uv tool install pre-commit --with pre-commit-uv | |
| - name: Run pre-commit | |
| run: uv tool run pre-commit run --show-diff-on-failure --color=always --all-files |