Skip to content

Commit

Permalink
Merge pull request #4 from Bart3kTK/spring_format_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart3kTK authored Nov 9, 2024
2 parents 9a52395 + ed42314 commit 65b0670
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 6 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/spring_format_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Spring format check pipeline

on:
push:
branches:
- main
paths:
- spring/**
pull_request:
paths:
- spring/**

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Spring format check
working-directory: ./spring
run: mvn formatter:validate
29 changes: 29 additions & 0 deletions .github/workflows/spring_mvn_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Spring mvn tests pipeline

on:
push:
branches:
- main
paths:
- spring/**
pull_request:
paths:
- spring/**

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven

- name: Run mvn tests
working-directory: ./spring
run: mvn test
15 changes: 15 additions & 0 deletions spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,21 @@

<build>
<plugins>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>2.24.1</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@SpringBootApplication
public class WeatherApplication {

public static void main(String[] args) {
SpringApplication.run(WeatherApplication.class, args);
}
public static void main(String[] args) {
SpringApplication.run(WeatherApplication.class, args);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@SpringBootTest
class WeatherApplicationTests {

@Test
void contextLoads() {
}
@Test
void contextLoads() {
}

}

0 comments on commit 65b0670

Please sign in to comment.