Delete empty exemplar stubs and skip empty exemplars in get_examples #28
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: Pre-commit Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| - new-workflow | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| - new-workflow | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for all branches and tags | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pre-commit | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Cache pre-commit hooks | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pre-commit | |
| key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} | |
| restore-keys: | | |
| pre-commit- | |
| - name: Run pre-commit | |
| run: pre-commit run --all-files --show-diff-on-failure | |
| - name: Annotate with pre-commit results | |
| if: failure() | |
| run: | | |
| echo "::error::Pre-commit checks failed. Please run 'pre-commit run --all-files' locally and commit the fixes." |