Plots.jl/.github/workflows/format_check.yml
Simon Christ 0813b18d69
Fix regression in legend font size setting (#4100)
* take legend font attributes from existing font

* "format" file

* format remaining files

* better in the error box
2022-02-11 15:26:01 +01:00

38 lines
906 B
YAML

name: format
on:
push:
branches:
- 'master'
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@v2
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(["src", "test"], verbose=true)'
- name: Format check
run: |
julia -e '
out = Cmd(`git diff --name-only`) |> read |> String
if out == ""
exit(0)
else
@error "These files have not been formatted:\n$out"
exit(1)
end'