-
-
Notifications
You must be signed in to change notification settings - Fork 358
39 lines (35 loc) · 1.09 KB
/
format_check.yml
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
35
36
37
38
39
name: format
on:
workflow_dispatch:
pull_request:
push:
branches: [master, v2]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@latest
- name: format Julia files
run: |
julia --color=yes --compile=min -O0 -e '
using Pkg; Pkg.add("JuliaFormatter")
using JuliaFormatter
format(["RecipesBase", "RecipesPipeline", "PlotsBase", "src", "test", "GraphRecipes", "StatsPlots", "PlotThemes"])
'
- name: suggester
if: success() && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/v2' )
uses: reviewdog/action-suggester@v1
with:
tool_name: JuliaFormatter
fail_on_error: true
# reviewdog/action-suggester not using `cleanup` flag?
- name: cleanup
if: success() || failure()
run: |
git checkout -- .
git clean --force
shell: bash