Add support for alignment in lines with zero-width characters #10
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 tests that the pre-commit hook works as expected. | |
| name: PreCommitHooks | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| branches: | |
| - 'master' | |
| pull_request: | |
| branches: | |
| - 'master' | |
| jobs: | |
| pre-commit: | |
| name: julia-formatter hook | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: julia-actions/setup-julia@v3 | |
| with: | |
| version: '1' | |
| - name: Install checked out JuliaFormatter in global env | |
| run: | | |
| julia -e 'using Pkg; Pkg.add(; path=".")' | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Test pre-commit hook | |
| working-directory: .github/workflows/pre-commit | |
| run: | | |
| # Run pre-commit hook, check that it fails. | |
| # pre-commit try-repo will fail if the hook makes changes | |
| pipx run pre-commit try-repo ../../../ julia-formatter --files main.jl --verbose && exit 1 | |
| # Check that the file was changed. | |
| git diff --exit-code main.jl && exit 1 | |
| # Check that running the hook again succeeds. | |
| pipx run pre-commit try-repo ../../../ julia-formatter --files main.jl --verbose |