Skip to content

Commit

Permalink
copy formatting github action from ChainRulesCore.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Oct 16, 2023
1 parent a9fedbe commit 1e9ffca
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
name: Code style
name: Format suggestions

on:
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
code-style:
format:
runs-on: ubuntu-latest
steps:
- uses: tkf/julia-code-style-suggesters@v1
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: 1
- run: |
julia -e 'using Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format("."; verbose=true)'
- uses: reviewdog/action-suggester@v1
with:
tool_name: JuliaFormatter
fail_on_error: true
filter_mode: added

0 comments on commit 1e9ffca

Please sign in to comment.