Skip to content

Commit 56ac007

Browse files
committed
Update formatter action
1 parent 2f937d0 commit 56ac007

File tree

1 file changed

+6
-37
lines changed

1 file changed

+6
-37
lines changed

.github/workflows/FormatCheck.yml

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,16 @@
1-
name: FormatCheck
1+
name: "Format Check"
22

33
on:
44
push:
55
branches:
66
- 'main'
77
- 'master'
8-
- 'release-'
98
tags: '*'
109
pull_request:
1110

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

0 commit comments

Comments
 (0)