Skip to content

Commit ce9905e

Browse files
committed
ci(github-actions): update the formatter action
1 parent f9e12e7 commit ce9905e

File tree

1 file changed

+3
-28
lines changed

1 file changed

+3
-28
lines changed

.github/workflows/format-check.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check format
1+
name: Format Suggestions
22
on:
33
push:
44
branches:
@@ -7,32 +7,7 @@ on:
77
pull_request:
88

99
jobs:
10-
format:
10+
code-style:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
14-
- uses: dorny/[email protected]
15-
id: filter
16-
with:
17-
filters: |
18-
julia_file_change:
19-
- added|modified: '**.jl'
20-
- uses: julia-actions/setup-julia@latest
21-
if: steps.filter.outputs.julia_file_change == 'true'
22-
with:
23-
version: 1.10
24-
- name: Install JuliaFormatter.jl
25-
run: julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
26-
- name: Format code
27-
run: julia -e 'using JuliaFormatter; format(["src", "ext", "test"], verbose=true)'
28-
- name: Format check
29-
run: |
30-
julia -e '
31-
out = Cmd(`git diff --name-only`) |> read |> String
32-
if out == ""
33-
exit(0)
34-
else
35-
@error "Some files have not been formatted !!!"
36-
write(stdout, out)
37-
exit(1)
38-
end'
13+
- uses: julia-actions/julia-format@v3

0 commit comments

Comments
 (0)