Skip to content

Commit eaf4d21

Browse files
committed
update formatting check
1 parent ef3d20c commit eaf4d21

File tree

1 file changed

+6
-36
lines changed

1 file changed

+6
-36
lines changed

.github/workflows/FormatCheck.yml

Lines changed: 6 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,13 @@ on:
55
branches:
66
- 'main'
77
- 'master'
8-
- 'release-'
98
tags: '*'
109
pull_request:
10+
branches:
11+
- 'main'
12+
- 'master'
1113

1214
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'
15+
formatcheck:
16+
name: "Format Check"
17+
uses: "QuantumKitHub/QuantumKitHubActions/.github/workflows/FormatCheck.yml@main"

0 commit comments

Comments
 (0)