Skip to content

Commit

Permalink
add FormatPR.yml, JuliaFormatter.toml (#33)
Browse files Browse the repository at this point in the history
* add FormatPR.yml, JuliaFormatter.toml

* Add Julia v1.9 to CI.yml

---------

Co-authored-by: Júlio Hoffimann <[email protected]>
  • Loading branch information
josemanuel22 and juliohm authored Sep 8, 2024
1 parent 88beb3b commit 0bee051
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
indent = 2
margin = 120
always_for_in = true
always_use_return = false
whitespace_typedefs = false
whitespace_in_kwargs = false
whitespace_ops_in_indices = true
remove_extra_newlines = true
trailing_comma = false
normalize_line_endings = "unix"
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
fail-fast: false
matrix:
version:
- '1.9'
- '1'
os:
- ubuntu-latest
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/FormatPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: FormatPR
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
run: |
julia -e 'import Pkg; Pkg.add("JuliaFormatter")'
julia -e 'using JuliaFormatter; format(".")'
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: ":robot: Format .jl files"
title: '[AUTO] JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

0 comments on commit 0bee051

Please sign in to comment.