Skip to content

Commit 181f581

Browse files
committed
ci: update format check workflow to use centralised reusable workflow
1 parent 575b7e4 commit 181f581

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

.github/workflows/FormatCheck.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: format-check
1+
name: "Format Check"
22

33
on:
44
push:
55
branches:
66
- 'master'
7-
- 'release-'
87
tags: '*'
98
pull_request:
109

@@ -15,33 +14,6 @@ concurrency:
1514
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1615

1716
jobs:
18-
build:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: julia-actions/setup-julia@v2
23-
with:
24-
version: 1
25-
- name: Install JuliaFormatter
26-
run: |
27-
using Pkg
28-
name = "JuliaFormatter"
29-
uuid = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
30-
Pkg.add(; name, uuid)
31-
shell: julia --color=yes {0}
32-
- name: Format Julia code
33-
run: |
34-
using JuliaFormatter
35-
format("."; verbose = true)
36-
shell: julia --color=yes {0}
37-
- name: Format check
38-
run: |
39-
out = Cmd(`git diff --name-only`) |> read |> String
40-
if out == ""
41-
exit(0)
42-
else
43-
@error "Some files have not been formatted !!!"
44-
write(stdout, out)
45-
exit(1)
46-
end
47-
shell: julia --color=yes {0}
17+
format-check:
18+
name: "Format Check"
19+
uses: "SciML/.github/.github/workflows/format-check.yml@v1"

0 commit comments

Comments
 (0)