diff --git a/.github/workflows/Format-check.yml b/.github/workflows/Format-check.yml deleted file mode 100644 index 3a5ca7575..000000000 --- a/.github/workflows/Format-check.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: format - -on: - push: - branches: - - 'master' - - 'release-' - tags: '*' - pull_request: - -jobs: - check: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: ['1'] - julia-arch: [x64] - os: [ubuntu-latest] - steps: - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - - - uses: actions/checkout@v4 - - name: Install JuliaFormatter and format - run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' - julia -e 'using JuliaFormatter; format(["src", "test", "ext", "filters", "gen"], verbose=true)' - - - name: Format check - run: | - git diff --color=always --exit-code diff --git a/.github/workflows/Format.yml b/.github/workflows/Format.yml new file mode 100644 index 000000000..87b25049b --- /dev/null +++ b/.github/workflows/Format.yml @@ -0,0 +1,13 @@ +name: Format suggestions +on: + pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [ opened, reopened, synchronize, labeled, unlabeled ] +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/julia-format@v3 + with: + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') + suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs