Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeage committed May 27, 2024
1 parent 11d7de2 commit 0d0ebd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ jobs:
- name: Install pre-commit
run: python -m pip install pre-commit
shell: bash
- name: Run pre-commit once to install dependencies
run: pre-commit run
- name: Cache pre-commit packages
- name: Cache pre-commit environments
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit dotnet-format, with retries (sometimes fails due to a NuGet issue, although we can't specifically detect that)
- name: Setup pre-commit environments
run: pre-commit run
- name: Run pre-commit dotnet-format, with retries
uses: Wandalen/wretry.action@v3
with:
command: pre-commit run dotnet-format --show-diff-on-failure --color=always --all-files
- name: Skip dotnet-format on the regular run, since it's already been run
- name: Remove dotnet-format from the list of pre-commit jobs to run (since we already ran it)
run: yq eval 'del(.repos[] | select(.hooks[].id == "dotnet-format"))' -i .pre-commit-config.yaml
- name: Run the rest of pre-commit
run: pre-commit run --show-diff-on-failure --color=always --all-files

0 comments on commit 0d0ebd2

Please sign in to comment.