Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinKaisermayer committed Dec 18, 2024
1 parent 6fc8f84 commit 61f0613
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
name: Format Check
name: format-check

on:
push:
branches:
- "main"
- "release-"
tags: "*"
pull_request:
- "master"
- "release-*" # Match release branches
tags: "*" # Trigger on tag pushes
pull_request: # Trigger on pull requests

jobs:
build:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1] # Julia versions
julia-arch: [x86] # Architectures
os: [ubuntu-latest] # OS
steps:
- uses: julia-actions/setup-julia@latest
# Step 1: Set up Julia
- name: Set up Julia
uses: julia-actions/setup-julia@latest
with:
version: 1
- uses: actions/checkout@v4
- name: Install JuliaFormatter
run: |
using Pkg
Pkg.add("JuliaFormatter")
shell: julia --color=yes {0}
- name: Format code
version: ${{ matrix.julia-version }}
arch: ${{ matrix.julia-arch }}

# Step 2: Check out code
- name: Checkout code
uses: actions/checkout@v4

# Step 3: Install JuliaFormatter and check formatting
- name: Install JuliaFormatter and check formatting
run: |
using JuliaFormatter
format("."; verbose=true)
shell: julia --color=yes {0}
- name: Suggest formatting changes
uses: reviewdog/action-suggester@v1
if: github.event_name == 'pull_request'
with:
tool_name: JuliaFormatter
fail_on_error: true
julia -e '
using Pkg;
Pkg.add(PackageSpec(name="JuliaFormatter"));
using JuliaFormatter;
result = format(".", verbose=true)
if !result
error("Some files are not properly formatted. Please run `using JuliaFormatter; format(\".\")` locally.")
else
println("All files are properly formatted.")
end
'

0 comments on commit 61f0613

Please sign in to comment.