Bump crate-ci/typos from 1.17.0 to 1.18.0 #70
Workflow file for this run
This file contains 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: format-check | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1' | |
- uses: actions/checkout@v4 | |
- name: Install JuliaFormatter | |
# This will use the latest version by default but you could set the version as well: | |
# Pkg.add(; name="JuliaFormatter", version="1") | |
run: | | |
using Pkg | |
Pkg.add(; name="JuliaFormatter") | |
shell: julia --color=yes {0} | |
- name: Run formatter | |
run: | | |
using JuliaFormatter | |
format("."; verbose=true) | |
shell: julia --color=yes {0} | |
- name: Format check | |
run: | | |
out = Cmd(`git diff --name-only`) |> read |> String | |
if out == "" | |
exit(0) | |
else | |
@error "Some files have not been formatted !!!" | |
write(stdout, out) | |
exit(1) | |
end | |
shell: julia --color=yes {0} |