Road to plots 2.0 #2318
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: format | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
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: Install dependencies | |
run: | | |
using Pkg | |
Pkg.add([ | |
PackageSpec("JuliaFormatter"), | |
PackageSpec(url = "https://github.com/tkf/JuliaProjectFormatter.jl.git"), | |
]) | |
shell: julia --color=yes {0} | |
- name: Format Julia files | |
run: | | |
using JuliaFormatter | |
format(["RecipesBase", "RecipesPipeline", "src", "test", "ext"]) | |
shell: julia --color=yes --compile=min -O0 {0} | |
- name: suggester / JuliaFormatter | |
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 | |
# temporarily disable `JuliaProjectFormatter` until github.com/tkf/JuliaProjectFormatter.jl/pull/7 is merged | |
# - name: Format Julia project files | |
# if: success() || failure() | |
# run: | | |
# using JuliaProjectFormatter | |
# format_projects() | |
# shell: julia --color=yes --compile=min -O0 {0} | |
# - name: suggester / JuliaProjectFormatter | |
# if: success() || failure() | |
# uses: reviewdog/action-suggester@v1 | |
# with: | |
# tool_name: JuliaProjectFormatter | |
# fail_on_error: true |