Make FormatBot use jlfmt + convert to local script #747
Workflow file for this run
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
| # This workflow runs pre-commit on the JuliaFormatter repo itself, i.e., | |
| # checks that this repo is formatted. | |
| name: Pre-Commit | |
| # needed to allow julia-actions/cache to delete old caches that it has created | |
| permissions: | |
| actions: write | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| tags: ['*'] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 120 | |
| steps: | |
| - uses: actions/checkout@v7 | |
| # Note: Pkg App support only in >= 1.12 | |
| - uses: julia-actions/setup-julia@v3 | |
| - uses: julia-actions/cache@v3 | |
| - name: Install local JuliaFormatter as Pkg app | |
| run: julia --project -e 'using Pkg; Pkg.instantiate(); Pkg.Apps.develop(; path=pwd())' | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Run pre-commit hooks | |
| run: | | |
| export PATH=$PATH:${HOME}/.julia/bin/ | |
| pipx run pre-commit run --all-files --show-diff-on-failure --color always |