From 47b9b4073dcd3634e08e65ba65c2ec39ac65b32a Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 17:00:43 +0800 Subject: [PATCH 1/6] Add CI --- .github/workflows/ci.yml | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8b57e61 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main, dev ] + pull_request: + branches: [ main, dev ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + test: + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'skip ci')" + strategy: + fail-fast: false + matrix: + version: + - '1.10' +# - 'nightly' + os: + - ubuntu-latest +# - macOS-latest +# - windows-latest + arch: + - x64 + steps: + - run: | + pip3 install meshio scipy --user + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: actions/cache@v1 + env: + cache-name: cache-artifacts + with: + path: ~/.julia/artifacts + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} + restore-keys: | + ${{ runner.os }}-test-${{ env.cache-name }}- + ${{ runner.os }}-test- + ${{ runner.os }}- + - uses: julia-actions/julia-buildpkg@latest + - run: | + git config --global user.name Tester + git config --global user.email te@st.er + - uses: julia-actions/julia-runtest@latest + continue-on-error: ${{ matrix.version == 'nightly' }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v1 + with: + file: lcov.info \ No newline at end of file From e864dc3f72c84b4403eba997d08acd078a315468 Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 17:12:24 +0800 Subject: [PATCH 2/6] Add tag bot --- .github/workflows/tag.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..69ba001 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,12 @@ +name: TagBot +on: + schedule: + - cron: 0 0 * * * +jobs: + TagBot: + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} \ No newline at end of file From d15e3e538fd561e128f189601c7e3232515e5a19 Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 17:14:12 +0800 Subject: [PATCH 3/6] Add compatibility helper --- .github/workflows/compat.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/compat.yml diff --git a/.github/workflows/compat.yml b/.github/workflows/compat.yml new file mode 100644 index 0000000..d7cef78 --- /dev/null +++ b/.github/workflows/compat.yml @@ -0,0 +1,16 @@ +name: CompatHelper + +on: + schedule: + - cron: '00 00 * * *' + +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Pkg.add("CompatHelper") + run: julia -e 'using Pkg; Pkg.add("CompatHelper")' + - name: CompatHelper.main() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: julia -e 'using CompatHelper; CompatHelper.main()' \ No newline at end of file From d7d6f22e5042196bcc1c52d0ffb9506869efc1d4 Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 17:14:24 +0800 Subject: [PATCH 4/6] Add formatter --- .github/workflows/format.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..99d7ff8 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,13 @@ +name: Format suggestions +on: + pull_request: + # this argument is not required if you don't use the `suggestion-label` input + types: [ opened, reopened, synchronize, labeled, unlabeled ] +jobs: + code-style: + runs-on: ubuntu-latest + steps: + - uses: julia-actions/julia-format@v3 + with: + version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') + suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs \ No newline at end of file From 05b54b521757b430ac153449dfe60c9982e44d3f Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 22:20:37 +0800 Subject: [PATCH 5/6] Format codes --- lib/P4estTypes/src/connectivity.jl | 4 +- lib/P4estTypes/src/ghost.jl | 21 ++-- lib/P4estTypes/src/pxest.jl | 148 +++++++++++++++-------------- lib/P4estTypes/src/sc.jl | 22 ++--- test/runtests.jl | 1 - 5 files changed, 105 insertions(+), 91 deletions(-) diff --git a/lib/P4estTypes/src/connectivity.jl b/lib/P4estTypes/src/connectivity.jl index 62ebe6b..4a2589d 100755 --- a/lib/P4estTypes/src/connectivity.jl +++ b/lib/P4estTypes/src/connectivity.jl @@ -236,7 +236,6 @@ end | | / | |/ 1--------3 - """ function Connectivity{X}(vertices::AbstractVector, cells::AbstractVector) where {X} if X == 4 @@ -292,7 +291,8 @@ function Base.:(==)(x::Connectivity{8}, y::Connectivity{8}) p8est_connectivity_is_equivalent(x.pointer, y.pointer) == 1 end -Base.isvalid(c::Connectivity{4}) = GC.@preserve c p4est_connectivity_is_valid(c.pointer) == 1 +Base.isvalid(c::Connectivity{4}) = + GC.@preserve c p4est_connectivity_is_valid(c.pointer) == 1 Base.sizeof(c::Connectivity{4}) = Int(p4est_connectivity_memory_used(c.pointer)) Base.isvalid(c::Connectivity{8}) = p8est_connectivity_is_valid(c.pointer) == 1 diff --git a/lib/P4estTypes/src/ghost.jl b/lib/P4estTypes/src/ghost.jl index 35e7bbe..b031c5e 100644 --- a/lib/P4estTypes/src/ghost.jl +++ b/lib/P4estTypes/src/ghost.jl @@ -43,13 +43,14 @@ Construct a ghost layer of quadrants that neighbor the local to the rank for the given `forest`. Here `connection` determines what neighboring quadrants to include (across face, edge, corner, or full) and can take the values: -- `P4estTypes.CONNECT_FULL(Val(4))`: get face and corner neighbors. -- `P4estTypes.CONNECT_FULL(Val(8))`: get face, edge, and corner neighbors. -- `P4estTypes.CONNECT_FACE(Val(4))`: get face neighbors. -- `P4estTypes.CONNECT_FACE(Val(8))`: get face neighbors. -- `P4estTypes.CONNECT_EDGE(Val(8))`: get face and edge neighbors. -- `P4estTypes.CONNECT_CORNER(Val(4))`: get face and corner neighbors. -- `P4estTypes.CONNECT_CORNER(Val(8)): `get face, edge, and corner neighbors. + + - `P4estTypes.CONNECT_FULL(Val(4))`: get face and corner neighbors. + - `P4estTypes.CONNECT_FULL(Val(8))`: get face, edge, and corner neighbors. + - `P4estTypes.CONNECT_FACE(Val(4))`: get face neighbors. + - `P4estTypes.CONNECT_FACE(Val(8))`: get face neighbors. + - `P4estTypes.CONNECT_EDGE(Val(8))`: get face and edge neighbors. + - `P4estTypes.CONNECT_CORNER(Val(4))`: get face and corner neighbors. + - `P4estTypes.CONNECT_CORNER(Val(8)): `get face, edge, and corner neighbors. """ function ghostlayer(forest::Pxest{X}; connection = CONNECT_FULL(Val(X))) where {X} return GhostLayer{X}((pxest_ghost_new(Val(X)))(forest, connection)) @@ -160,6 +161,7 @@ end Returns 0-based indices into `mirror_proc_mirrors` for each rank. This includes an extra entry at the end of the array so that 1-based range into `mirror_proc_mirrors` for rank `r` can be built with + ``` (mirror_proc_offsets[r]+1):mirror_proc_offsets[r+1] ``` @@ -184,10 +186,13 @@ end Returns 0-based indices into [`ghosts`](@ref) for each rank. This includes an extra entry at the end of the array so that 1-based range into [`ghosts`](@ref) for rank `r` can be built with + ``` (proc_offsets[r]+1):proc_offsets[r+1] ``` + Thus the ghost quadrants associated with rank `r` can be obtained with + ``` ghosts(ghost)[(proc_offsets[r]+1):proc_offsets[r+1]] ``` @@ -212,10 +217,12 @@ end Returns 0-based indices into [`mirrors`](@ref). This is used in conjunction with `mirror_proc_offsets` to get the mirror quadrants associated with each rank. For example + ``` rrange = (mirror_proc_offsets[r]+1):mirror_proc_offsets[r+1] mirrors(ghost)[mirror_proc_mirrors(rrange)] ``` + selects the mirror quadrants associated with rank `r`. See `@doc P4estTypes.P4est.p4est_ghost_t` and diff --git a/lib/P4estTypes/src/pxest.jl b/lib/P4estTypes/src/pxest.jl index 53bc836..f482902 100644 --- a/lib/P4estTypes/src/pxest.jl +++ b/lib/P4estTypes/src/pxest.jl @@ -414,18 +414,18 @@ are split (based on a space-filling curve order) among the ranks. The keyword arguments (`kw...`) that control the construction of the forest are: - - `comm = MPI.COMM_WORLD`: the MPI Communicator object of the ranks sharing + - `comm = MPI.COMM_WORLD`: the MPI Communicator object of the ranks sharing the forest. - - `min_quadrants = 0`: the minimum number of quadrants per rank. (This makes - the initial refinement pattern `MPI.Comm_size` specific.) - - `min_level = 0`: the minimum level of quadrant refinement for the forest. - - `fill_uniform = true`: if `true` the forest will be filled with a uniform - mesh otherwise it is the coarsest possible mesh. - - `data_type = Nothing`: an `isbitstype` of the user data stored for each - quadrant. - - `init_function = nothing`: callback function with - prototype `init_function(forest, treeid, quadrant)` called for each quadrant - to initialized the user data. + - `min_quadrants = 0`: the minimum number of quadrants per rank. (This makes + the initial refinement pattern `MPI.Comm_size` specific.) + - `min_level = 0`: the minimum level of quadrant refinement for the forest. + - `fill_uniform = true`: if `true` the forest will be filled with a uniform + mesh otherwise it is the coarsest possible mesh. + - `data_type = Nothing`: an `isbitstype` of the user data stored for each + quadrant. + - `init_function = nothing`: callback function with + prototype `init_function(forest, treeid, quadrant)` called for each quadrant + to initialized the user data. """ function pxest( connectivity::Connectivity{X}; @@ -528,6 +528,7 @@ Base.IndexStyle(::Pxest) = IndexLinear() Returns 0-based indices into global quadrants. This includes an extra entry at the end of the array so that 1-based range into the global quadrants for rank `r` can be built with + ``` (global_first_quadrant[r]+1):global_first_quadrant[r+1] ``` @@ -602,16 +603,17 @@ Execute the callbacks passed as keyword arguments for every volume, face, edge, and corner of the rank-local forest. The keyword arguments (`kw...`) for the iteration are: - - `ghost = nothing`: the ghost layer associated for the mesh. Used in - `face`, `edge`, and `corner` callbacks for neighboring elements not - rank local. - - `volume = nothing`: Callback used for every volume (aka quadrant) of - the local forest with the prototype - `volume(forest, ghost, quadrant, quadid, treeid, userdata)`. - - `face = nothing`: Not implemented yet. - - `edge = nothing`: Not implemented yet. - - `corner = nothing`: Not implemented yet. - - `userdata = nothing`: User data passed to the callbacks. + + - `ghost = nothing`: the ghost layer associated for the mesh. Used in + `face`, `edge`, and `corner` callbacks for neighboring elements not + rank local. + - `volume = nothing`: Callback used for every volume (aka quadrant) of + the local forest with the prototype + `volume(forest, ghost, quadrant, quadid, treeid, userdata)`. + - `face = nothing`: Not implemented yet. + - `edge = nothing`: Not implemented yet. + - `corner = nothing`: Not implemented yet. + - `userdata = nothing`: User data passed to the callbacks. See `@doc P4estTypes.P4est.p4est_iterate` and `@doc P4estTypes.P4est.p8est_iterate` for more information about @@ -863,14 +865,15 @@ If the callback returns `true` the `siblings` will coarsen into one quadrant otherwise they will be untouched. The other keyword arguments (`kw...`) for the coarsening are: - - `recursive = false`: if `true` coarsening will be recursive otherwise each - set of rank-local siblings will only be visited once. - - `init = nothing`: callback function with prototype - `init(forest, treeid, quadrant)` called for each quadrant created to - initialized the user data. - - `replace = nothing`: callback function with prototype - `replace(forest, treeid, outgoing, incoming)` called for each set of - `outgoing` quadrants with their associated `incoming` quadrant. Note + + - `recursive = false`: if `true` coarsening will be recursive otherwise each + set of rank-local siblings will only be visited once. + - `init = nothing`: callback function with prototype + `init(forest, treeid, quadrant)` called for each quadrant created to + initialized the user data. + - `replace = nothing`: callback function with prototype + `replace(forest, treeid, outgoing, incoming)` called for each set of + `outgoing` quadrants with their associated `incoming` quadrant. Note both `outgoing` and `incoming` are arrays with `eltype` [`QuadrantWrapper`](@ref). @@ -972,17 +975,18 @@ local to the rank. If the callback returns `true` the `quadrant` will refine into multiple quadrants otherwise it will be untouched. The other keyword arguments (`kw...`) for the refining are: - - `recursive`: if `true` refining will be recursive otherwise each - rank-local quadrant will only be visited once. - - `maxlevel = -1`: the maximum level of refinement possible during this - call. - - `init = nothing`: callback function with prototype - `init(forest, treeid, quadrant)` called for each quadrant created to - initialized the user data. - - `replace = nothing`: callback function with prototype - `replace(forest, treeid, outgoing, incoming)` called for each - `outgoing` quadrant with their associated `incoming` quadrants. Note both - `outgoing` and `incoming` are arrays with `eltype` [`QuadrantWrapper`](@ref). + + - `recursive`: if `true` refining will be recursive otherwise each + rank-local quadrant will only be visited once. + - `maxlevel = -1`: the maximum level of refinement possible during this + call. + - `init = nothing`: callback function with prototype + `init(forest, treeid, quadrant)` called for each quadrant created to + initialized the user data. + - `replace = nothing`: callback function with prototype + `replace(forest, treeid, outgoing, incoming)` called for each + `outgoing` quadrant with their associated `incoming` quadrants. Note both + `outgoing` and `incoming` are arrays with `eltype` [`QuadrantWrapper`](@ref). See `@doc P4estTypes.P4est.p4est_refine_ext` and `@doc P4estTypes.P4est.p8est_refine_ext` for more information about @@ -1037,21 +1041,23 @@ Enforce the two-to-one quadrant size constraint across the forest. By default, this constraint is enforced across faces, edges, and corners. The keyword arguments (`kw...`) for the balancing are: - - `connect`: type of constraint enforced which can take the values: - - `P4estTypes.CONNECT_FULL(Val(4))`: enforce across face, and corner. - - `P4estTypes.CONNECT_FULL(Val(8))`: enforce across face, edge, and corner. - - `P4estTypes.CONNECT_FACE(Val(4))`: enforce across face. - - `P4estTypes.CONNECT_FACE(Val(8))`: enforce across face. - - `P4estTypes.CONNECT_EDGE(Val(8))`: enforce across face and edge. - - `P4estTypes.CONNECT_CORNER(Val(4))`: enforce across face and corner. - - `P4estTypes.CONNECT_CORNER(Val(8))`: enforce across face, edge, and corner. - - `init = nothing`: callback function with prototype - `init(forest, treeid, quadrant)` called for each quadrant created to - initialized the user data. - - `replace = nothing`: callback function with prototype - `replace(forest, treeid, outgoing, incoming)` called for each - `outgoing` quadrant with their associated `incoming` quadrants. Note both - `outgoing` and `incoming` are arrays with `eltype` [`QuadrantWrapper`](@ref). + + - `connect`: type of constraint enforced which can take the values: + + + `P4estTypes.CONNECT_FULL(Val(4))`: enforce across face, and corner. + + `P4estTypes.CONNECT_FULL(Val(8))`: enforce across face, edge, and corner. + + `P4estTypes.CONNECT_FACE(Val(4))`: enforce across face. + + `P4estTypes.CONNECT_FACE(Val(8))`: enforce across face. + + `P4estTypes.CONNECT_EDGE(Val(8))`: enforce across face and edge. + + `P4estTypes.CONNECT_CORNER(Val(4))`: enforce across face and corner. + + `P4estTypes.CONNECT_CORNER(Val(8))`: enforce across face, edge, and corner. + - `init = nothing`: callback function with prototype + `init(forest, treeid, quadrant)` called for each quadrant created to + initialized the user data. + - `replace = nothing`: callback function with prototype + `replace(forest, treeid, outgoing, incoming)` called for each + `outgoing` quadrant with their associated `incoming` quadrants. Note both + `outgoing` and `incoming` are arrays with `eltype` [`QuadrantWrapper`](@ref). See `@doc P4estTypes.P4est.p4est_balance_ext` and `@doc P4estTypes.P4est.p8est_balance_ext` for more information about @@ -1142,14 +1148,15 @@ to the node degree. This requires the [`GhostLayer`](@ref) which if not passed in `ghost` will be created. The keyword arguments (`kw...`) for the partitioning are: - - `ghost = nothing`: [`GhostLayer`](@ref) used when partitioning by - [`LNodes`](@ref). - - `lnodes_degree = nothing`: partition based on [`LNodes`](@ref) if this is - set to the degree. - - `allow_for_coarsening = false`: if `true` sibling groups that may be - coarsened will be collect on the same rank. - - `weight = nothing`: callback that give the `Float64` weight of each quadrant - to perform a weighted partitioning. + + - `ghost = nothing`: [`GhostLayer`](@ref) used when partitioning by + [`LNodes`](@ref). + - `lnodes_degree = nothing`: partition based on [`LNodes`](@ref) if this is + set to the degree. + - `allow_for_coarsening = false`: if `true` sibling groups that may be + coarsened will be collect on the same rank. + - `weight = nothing`: callback that give the `Float64` weight of each quadrant + to perform a weighted partitioning. See `@doc P4estTypes.P4est.p4est_partition_ext`, `@doc P4estTypes.P4est.p8est_partition_ext`, @@ -1222,13 +1229,14 @@ are created for ease of importing the mesh into Paraview and Visit, respectively. The keyword arguments (`kw...`) are: - - `scale = 1.0`: a `scale < 1.0` places a visual gap between adjacent - quadrants. - - `writetree = true`: if `true` include the _zero-based_ tree id in VTK cell - data. - - `writelevel = true`: if `true` include the quadrant level in VTK cell data. - - `writerank = true`: if `true` include the MPI rank in VTK cell data. - - `wraprank = 0`: if `wraprank > 0` the MPI rank is stored modulo `wraprank`. + + - `scale = 1.0`: a `scale < 1.0` places a visual gap between adjacent + quadrants. + - `writetree = true`: if `true` include the _zero-based_ tree id in VTK cell + data. + - `writelevel = true`: if `true` include the quadrant level in VTK cell data. + - `writerank = true`: if `true` include the MPI rank in VTK cell data. + - `wraprank = 0`: if `wraprank > 0` the MPI rank is stored modulo `wraprank`. """ function savevtk( prefix, diff --git a/lib/P4estTypes/src/sc.jl b/lib/P4estTypes/src/sc.jl index ec07e9d..0d3a6e1 100644 --- a/lib/P4estTypes/src/sc.jl +++ b/lib/P4estTypes/src/sc.jl @@ -16,17 +16,17 @@ using P4est An abstract type for p4est and libsc log priorities. The follow priorities are available: -- [`P4estTypes.SC.LP.Default`](@ref Default): the libsc default. -- [`P4estTypes.SC.LP.Always`](@ref Always): log absolutely everything. -- [`P4estTypes.SC.LP.Trace`](@ref Trace): prefix file and line number. -- [`P4estTypes.SC.LP.Debug`](@ref Debug): any information on the internal state. -- [`P4estTypes.SC.LP.Verbose`](@ref Verbose): information on conditions, decisions. -- [`P4estTypes.SC.LP.Info`](@ref Info): most relevant things a function is doing. -- [`P4estTypes.SC.LP.Statistics`](@ref Statistics): important for consistency/performance. -- [`P4estTypes.SC.LP.Essential`](@ref Essential): a few lines at most for a major api function. -- [`P4estTypes.SC.LP.Production`](@ref Production): log a few lines max per program. -- [`P4estTypes.SC.LP.Error`](@ref Error): log errors only. -- [`P4estTypes.SC.LP.Silent`](@ref Silent): never log anything. + - [`P4estTypes.SC.LP.Default`](@ref Default): the libsc default. + - [`P4estTypes.SC.LP.Always`](@ref Always): log absolutely everything. + - [`P4estTypes.SC.LP.Trace`](@ref Trace): prefix file and line number. + - [`P4estTypes.SC.LP.Debug`](@ref Debug): any information on the internal state. + - [`P4estTypes.SC.LP.Verbose`](@ref Verbose): information on conditions, decisions. + - [`P4estTypes.SC.LP.Info`](@ref Info): most relevant things a function is doing. + - [`P4estTypes.SC.LP.Statistics`](@ref Statistics): important for consistency/performance. + - [`P4estTypes.SC.LP.Essential`](@ref Essential): a few lines at most for a major api function. + - [`P4estTypes.SC.LP.Production`](@ref Production): log a few lines max per program. + - [`P4estTypes.SC.LP.Error`](@ref Error): log errors only. + - [`P4estTypes.SC.LP.Silent`](@ref Silent): never log anything. """ abstract type LogPriority end diff --git a/test/runtests.jl b/test/runtests.jl index fe25ffa..083c51a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,2 +1 @@ using KitAMR - From 95c9e223a59e0e0565a1fe2f3385b8b964d99e5b Mon Sep 17 00:00:00 2001 From: vavrines Date: Mon, 1 Jul 2024 22:20:59 +0800 Subject: [PATCH 6/6] Adapt second formatter --- .github/workflows/format.yml | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 99d7ff8..07a31f6 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,13 +1,31 @@ -name: Format suggestions +name: FormatPR on: - pull_request: - # this argument is not required if you don't use the `suggestion-label` input - types: [ opened, reopened, synchronize, labeled, unlabeled ] + schedule: + - cron: '0 0 * * *' jobs: - code-style: + build: runs-on: ubuntu-latest steps: - - uses: julia-actions/julia-format@v3 + - uses: actions/checkout@v4 + - uses: julia-actions/cache@v1 + - name: Install JuliaFormatter and format + run: | + julia -e 'import Pkg; Pkg.add("JuliaFormatter")' + julia -e 'using JuliaFormatter; format(".")' + + # https://github.com/marketplace/actions/create-pull-request + # https://github.com/peter-evans/create-pull-request#reference-example + - name: Create Pull Request + id: cpr + uses: peter-evans/create-pull-request@v3 with: - version: '1' # Set `version` to '1.0.54' if you need to use JuliaFormatter.jl v1.0.54 (default: '1') - suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Format .jl files + title: 'Automatic 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 }}" \ No newline at end of file