Skip to content

Commit 8206264

Browse files
committed
ci: update format check workflow to use centralised reusable workflow
1 parent c242fc1 commit 8206264

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

.github/workflows/FormatCheck.yml

Lines changed: 4 additions & 35 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:
@@ -8,37 +8,6 @@ on:
88
pull_request:
99

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

0 commit comments

Comments
 (0)