Skip to content

Commit 8b8e968

Browse files
committed
update format action
1 parent 6aee859 commit 8b8e968

1 file changed

Lines changed: 15 additions & 35 deletions

File tree

.github/workflows/FormatCheck.yml

Lines changed: 15 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,22 @@
1-
# modified from https://github.com/SciML/DiffEqDocs.jl/tree/master/.github/workflows
2-
name: format-check
3-
1+
name: Runic formatting
42
on:
53
push:
64
branches:
7-
- 'main'
8-
tags: '*'
5+
- 'master'
6+
- 'release-'
7+
tags:
8+
- '*'
99
pull_request:
10-
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]
11+
runic:
12+
name: Runic
13+
runs-on: ubuntu-latest
1914
steps:
20-
- uses: julia-actions/setup-julia@latest
15+
- uses: actions/checkout@v4
16+
# - uses: julia-actions/setup-julia@v2
17+
# with:
18+
# version: '1'
19+
# - uses: julia-actions/cache@v2
20+
- uses: fredrikekre/runic-action@v1
2121
with:
22-
version: ${{ matrix.julia-version }}
23-
24-
- uses: actions/checkout@v1
25-
- name: Install Runic 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="Runic", version="0.1.0"))'
29-
run: |
30-
julia -e 'using Pkg; Pkg.add(PackageSpec(name="Runic"))'
31-
julia -e 'using Runic; 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'
22+
version: '1'

0 commit comments

Comments
 (0)