From f3d86c903a3ba36c9ac35615e82b0bc94488eccd Mon Sep 17 00:00:00 2001 From: huiyuxie Date: Thu, 17 Oct 2024 11:52:56 -1000 Subject: [PATCH] Start --- .github/workflows/FormatCheck.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index 26006b9555f..98989e46d22 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -1,4 +1,4 @@ -name: format-check +name: Format check and suggestions on: push: @@ -6,6 +6,8 @@ on: - 'main' tags: '*' pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [opened, reopened, synchronize, labeled, unlabeled] jobs: check-format: @@ -26,11 +28,9 @@ jobs: # # julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version = "0.13.0"))' # - # TODO: Change the call below to - # format(".") run: | julia -e 'using Pkg; Pkg.add(PackageSpec(name = "JuliaFormatter", version="1.0.60"))' - julia -e 'using JuliaFormatter; format(["benchmark", "examples", "ext", "src", "test", "utils"])' + julia -e 'using JuliaFormatter; format(".")' - name: Format check run: | julia -e ' @@ -42,3 +42,12 @@ jobs: write(stdout, out) exit(1) end' + + format-suggestions: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/julia-format@v3 + with: + version: "1" # Set this to '1.0.54' if needed + suggestion-label: "format-suggest" # Leave empty to show suggestions for all PRs