Skip to content

Commit b26da69

Browse files
committed
aded formatting to workflows
1 parent aa8c920 commit b26da69

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/Format.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Format
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
merge_group:
11+
types: [checks_requested]
12+
13+
concurrency:
14+
# Skip intermediate builds: always.
15+
# Cancel intermediate builds: only if it is a pull request build.
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
18+
19+
jobs:
20+
format:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: julia-actions/setup-julia@latest
25+
with:
26+
version: 1
27+
- name: Format code
28+
run: |
29+
using Pkg
30+
Pkg.add(; name="JuliaFormatter", uuid="98e50ef6-434e-11e9-1051-2b60c6c9e899")
31+
using JuliaFormatter
32+
format("."; verbose=true)
33+
shell: julia --color=yes {0}
34+
- uses: reviewdog/action-suggester@v1
35+
if: github.event_name == 'pull_request'
36+
with:
37+
tool_name: JuliaFormatter
38+
fail_on_error: true

0 commit comments

Comments
 (0)