Skip to content

Commit db8fae9

Browse files
committed
Move scalafmt to separate workflow
1 parent bf3cdcd commit db8fae9

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,4 @@ jobs:
2323
- name: Run tests
2424
uses: lokkju/github-action-sbt@master
2525
with:
26-
commands: test scripted headerCheck scapegoat
27-
28-
scalafmt:
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v2
32-
# only fetch the head commits of our branch & mainline
33-
# loosely based on https://github.com/actions/checkout/issues/329#issuecomment-717076567
34-
- name: Checkout branch history
35-
run: |
36-
git remote set-branches origin "${{github.base_ref}}" "${{github.head_ref}}"
37-
git fetch --depth 1
38-
git checkout "${{github.head_ref}}"
39-
40-
- name: Run scalafmt
41-
uses: stringbean/scalafmt-action@v2.0.0-beta
42-
with:
43-
compare-branch: master
26+
commands: test scripted headerCheck scapegoat
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Scalafmt lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'src/main/code/**'
7+
- 'src/test/code/**'
8+
- 'build.sbt'
9+
- 'project/*.scala'
10+
11+
jobs:
12+
lint:
13+
name: Scalafmt
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
# only fetch the head commits of our branch & mainline
19+
# loosely based on https://github.com/actions/checkout/issues/329#issuecomment-717076567
20+
- name: Checkout branches
21+
run: |
22+
git remote set-branches origin "${{github.base_ref}}" "${{github.head_ref}}"
23+
git fetch --depth 1
24+
git checkout "${{github.head_ref}}"
25+
- uses: stringbean/scalafmt-action@v2.0.0-beta
26+
with:
27+
compare-branch: master

0 commit comments

Comments
 (0)