Skip to content

Commit

Permalink
Try removing format from old jdk, test in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 11, 2024
1 parent ef42dfc commit 1f6e032
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ jobs:
java-version: ${{ matrix.java-version }}
distribution: 'adopt'

- name: Run tests
run: make ja_test ${{ matrix.java-version > 17 || 'MVN_FLAGS="-e -fn"' }}
- name: Run tests (serially)
if: ${{ matrix.java-version == 21 && matrix.os == 'ubuntu-latest' }}
run: make ja_test

- name: Run tests (in parallel)
if: ${{ matrix.java-version != 21 || matrix.os != 'ubuntu-latest' }}
run: make ja_test_auto

- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
51 changes: 31 additions & 20 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<version>1.0-SNAPSHOT</version>

<dependencies>
<!-- JUnit 5 dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down Expand Up @@ -69,25 +68,37 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.24.1</version>
<configuration>
<javaExclusionPattern>(\W+\.?[^\W]+\(.*\);?\n)+</javaExclusionPattern>
<lineSeparator>\n</lineSeparator>
<indentationSize>4</indentationSize>
<tabSize>4</tabSize>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>format</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.24.1</version>
<configuration>
<javaExclusionPattern>(\W+\.?[^\W]+\(.*\);?\n)+</javaExclusionPattern>
<lineSeparator>\n</lineSeparator>
<indentationSize>4</indentationSize>
<tabSize>4</tabSize>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit 1f6e032

Please sign in to comment.