Skip to content

Commit 550eb77

Browse files
committed
ci: update format check workflow to use centralised reusable workflow
1 parent 7b58f6d commit 550eb77

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,4 +1,4 @@
1-
name: format-check
1+
name: "Format Check"
22

33
on:
44
push:
@@ -9,34 +9,6 @@ on:
99
pull_request:
1010

1111
jobs:
12-
build:
13-
runs-on: ${{ matrix.os }}
14-
strategy:
15-
matrix:
16-
julia-version: [1]
17-
julia-arch: [x86]
18-
os: [ubuntu-latest]
19-
steps:
20-
- uses: julia-actions/setup-julia@latest
21-
with:
22-
version: ${{ matrix.julia-version }}
23-
24-
- uses: actions/checkout@v4
25-
- name: Install JuliaFormatter and format
26-
# This will use the latest version by default but you can set the version like so:
27-
#
28-
# julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))'
29-
run: |
30-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="1.0.32"))'
31-
julia -e 'using JuliaFormatter; format(".", verbose=true)'
32-
- name: Format check
33-
run: |
34-
julia -e '
35-
out = Cmd(`git diff --name-only`) |> read |> String
36-
if out == ""
37-
exit(0)
38-
else
39-
@error "Some files have not been formatted !!!"
40-
write(stdout, out)
41-
exit(1)
42-
end'
12+
format-check:
13+
name: "Format Check"
14+
uses: "SciML/.github/.github/workflows/format-check.yml@v1"

0 commit comments

Comments
 (0)