Skip to content

Commit 0d18b66

Browse files
Merge pull request #735 from SciML/at/use-reusable-workflows
ci: standardise workflows using SciML's reusable workflows
2 parents 8114391 + 5e1ca19 commit 0d18b66

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

.github/workflows/FormatCheck.yml

+4-33
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,13 @@
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

1110
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"))'
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'
11+
format-check:
12+
name: "Format Check"
13+
uses: "SciML/.github/.github/workflows/format-check.yml@v1"

0 commit comments

Comments
 (0)