From df4b8b4d7d795513887fb59c1cd3b5e5836738e8 Mon Sep 17 00:00:00 2001 From: Michael Schlottke-Lakemper Date: Wed, 24 Jan 2024 14:19:08 +0100 Subject: [PATCH] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1ccc69..5ffb39c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,9 +58,16 @@ jobs: - uses: julia-actions/cache@v1 - name: Apply JuliaFormatter and check format run: | - julia -e "using Pkg; Pkg.add(\"JuliaFormatter\")" - julia -e 'using JuliaFormatter; !format(".", verbose=true) && - error("Code not properly formatted")' + using Pkg + Pkg.add("JuliaFormatter") + + using JuliaFormatter + + is_unchanged = format(".", verbose=true) + if !is_unchanged + error("Code not properly formatted") + end + shell: julia --color=yes {0} - name: Build package uses: julia-actions/julia-buildpkg@v1 - name: Run tests