-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (34 loc) · 1.06 KB
/
style.yml
File metadata and controls
34 lines (34 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Style-Enforcer
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- 'README.md'
- '.gitignore'
jobs:
format-check:
name: Style Enforcement
runs-on: ubuntu-latest
strategy:
matrix:
julia-version: [min]
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Install JuliaFormatter
shell: julia --project=@format --color=yes {0}
run: |
using Pkg
Pkg.add(PackageSpec(; name="JuliaFormatter", version="1"))
- name: Check formatting
shell: julia --project=@format --color=yes {0}
run: |
using JuliaFormatter
format(".", YASStyle(); verbose=true) || exit(1)
# Add formatting suggestions to non-draft PRs even if "Check formatting" fails
- uses: reviewdog/action-suggester@v1
if: ${{ !cancelled() && github.event.pull_request.draft == false }}
with:
tool_name: JuliaFormatter