Skip to content

Commit 8fe0d2b

Browse files
authored
Merge pull request #307 from ReactiveBayes/make-formatting-a-separate-action
Create a separate CI action for formatting
2 parents b89f097 + d410d81 commit 8fe0d2b

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

.JuliaFormatter.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ align_pair_arrow = true
2323
align_matrix = false
2424
join_lines_based_on_source = false
2525
separate_kwargs_with_semicolon = false
26-
surround_whereop_typeparameters = true
26+
surround_whereop_typeparameters = true
27+
ignore = [ "docs", "examples" ]

.github/workflows/CI.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@ concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
1919
jobs:
20-
format:
21-
name: Julia Formatter
22-
runs-on: ubuntu-latest
23-
steps:
24-
- uses: actions/checkout@v4
25-
- uses: julia-actions/setup-julia@v2
26-
- uses: julia-actions/cache@v1
27-
- run: make lint
2820
paper:
2921
name: Paper Preview
3022
runs-on: ubuntu-latest
@@ -46,7 +38,6 @@ jobs:
4638
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
4739
runs-on: ${{ matrix.os }}
4840
continue-on-error: ${{ contains(matrix.version, 'nightly') }}
49-
needs: format
5041
strategy:
5142
fail-fast: false
5243
matrix:
@@ -78,7 +69,6 @@ jobs:
7869
examples:
7970
name: Examples
8071
runs-on: ubuntu-latest
81-
needs: format
8272
permissions:
8373
contents: write
8474
steps:
@@ -99,7 +89,6 @@ jobs:
9989
runs-on: ubuntu-latest
10090
needs:
10191
- test
102-
- format
10392
- examples
10493
permissions:
10594
contents: write

.github/workflows/Format.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Format suggestions
2+
on:
3+
pull_request:
4+
# this argument is not required if you don't use the `suggestion-label` input
5+
types: [ opened, reopened, synchronize, labeled, unlabeled ]
6+
jobs:
7+
code-style:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: julia-actions/julia-format@v3
11+
with:
12+
version: '1'
13+
suggestion-label: 'format-suggest' # leave this unset or empty to show suggestions for all PRs

0 commit comments

Comments
 (0)