Skip to content

Commit 3df1505

Browse files
authored
[Build] Disable spotless apply in ci (#2519)
Spotless reformats the code to the default when building locally. This should not run in CI. Then we can't check if the code was properly formatted. Additionally CI should only run each job once rather then once for a push or for a merge request.
1 parent ef814b0 commit 3df1505

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Cucumber CI
22

33
on:
4-
push:
54
pull_request:
5+
branches:
6+
- '**'
7+
push:
68
branches:
79
- main
810
- v4.x.x
@@ -30,7 +32,7 @@ jobs:
3032
- name: Install dependencies
3133
run: mvn install -DskipTests=true -DskipITs=true -Darchetype.test.skip=true -Dmaven.javadoc.skip=true -B --show-version --toolchains .github/workflows/.toolchains.xml
3234
- name: Test
33-
run: mvn verify -P-spotless-apply --toolchains .github/workflows/.toolchains.xml
35+
run: mvn verify --toolchains .github/workflows/.toolchains.xml
3436
env:
3537
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.CUCUMBER_PUBLISH_TOKEN }}
3638

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@
8282
<profile>
8383
<id>spotless-apply</id>
8484
<activation>
85-
<activeByDefault>true</activeByDefault>
85+
<property>
86+
<name>!CI</name>
87+
</property>
8688
</activation>
8789
<build>
8890
<pluginManagement>

0 commit comments

Comments
 (0)