Skip to content

Commit 8c39d07

Browse files
committed
First Commit
0 parents  commit 8c39d07

File tree

7 files changed

+309
-0
lines changed

7 files changed

+309
-0
lines changed

.github/workflows/maven.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Java CI with Maven
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up JDK 21
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '21'
19+
distribution: 'temurin'
20+
cache: maven
21+
22+
- name: Build with Maven
23+
run: mvn -B clean verify
24+
25+
- name: Upload coverage report
26+
uses: actions/upload-artifact@v4
27+
with:
28+
name: coverage-report
29+
path: target/site/jacoco/
30+
31+
- name: Generate coverage badge
32+
uses: cicirello/jacoco-badge-generator@v2
33+
with:
34+
jacoco-csv-file: target/site/jacoco/jacoco.csv
35+
badges-directory: badges
36+
generate-branches-badge: true
37+
38+
- name: Commit coverage badges
39+
uses: stefanzweifel/git-auto-commit-action@v5
40+
with:
41+
commit_message: "Update coverage badges"
42+
branch: main
43+
file_pattern: badges/*

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
HELP.md
2+
target/
3+
!.mvn/wrapper/maven-wrapper.jar
4+
!**/src/main/**/target/
5+
!**/src/test/**/target/
6+
7+
### STS ###
8+
.apt_generated
9+
.classpath
10+
.factorypath
11+
.project
12+
.settings
13+
.springBeans
14+
.sts4-cache
15+
16+
### IntelliJ IDEA ###
17+
.idea
18+
*.iws
19+
*.iml
20+
*.ipr
21+
22+
### NetBeans ###
23+
/nbproject/private/
24+
/nbbuild/
25+
/dist/
26+
/nbdist/
27+
/.nb-gradle/
28+
build/
29+
!**/src/main/**/build/
30+
!**/src/test/**/build/
31+
32+
### VS Code ###
33+
.vscode/

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Luis Machado Reis
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Flight Tracker Event Server
2+
3+
![Java](https://img.shields.io/badge/Java-21-blue)
4+
![SpringBoot](https://img.shields.io/badge/SpringBoot-3.4.x-blue)
5+
![JUnit](https://img.shields.io/badge/JUnit-5.x-blue)
6+
![JaCoCo](https://img.shields.io/badge/JaCoCo-0.8.x-blue)
7+
![Kafka](https://img.shields.io/badge/Kafka-4.x-red)
8+
9+
A Spring Boot application for tracking flight events.
10+
11+
## Build Status
12+
13+
[![Java CI with Maven](https://github.com/luismr/flight-tracker-event-server-java/actions/workflows/maven.yml/badge.svg)](https://github.com/luismr/flight-tracker-event-server-java/actions/workflows/maven.yml)
14+
15+
## Code Coverage
16+
17+
![Coverage](badges/jacoco.svg)
18+
![Branches](badges/branches.svg)
19+
20+
## Getting Started
21+
22+
### Prerequisites
23+
24+
- JDK 21
25+
- Maven 3.8+
26+
27+
### Cloning the Repository
28+
29+
```bash
30+
git clone git@github.com:luismr/flight-tracker-event-server-java.git
31+
cd flight-tracker-event-server-java
32+
```
33+
34+
### Building
35+
36+
```bash
37+
mvn clean install
38+
```
39+
40+
### Running
41+
42+
```bash
43+
mvn spring-boot:run
44+
```
45+
46+
## Contributing
47+
48+
1. Fork the repository
49+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
50+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
51+
4. Push to the branch (`git push origin feature/amazing-feature`)
52+
5. Open a Pull Request
53+
54+
## GitHub Actions Permissions
55+
56+
To enable automatic badge updates and coverage reports, ensure the following GitHub Actions permissions are set:
57+
58+
1. Go to your repository's Settings
59+
2. Navigate to Actions > General
60+
3. Under "Workflow permissions", select:
61+
- "Read and write permissions"
62+
- "Allow GitHub Actions to create and approve pull requests"
63+
64+
## Project Structure
65+
66+
```
67+
src/
68+
├── main/
69+
│ └── java/
70+
│ └── dev/
71+
│ └── luismachadoreis/
72+
│ └── flighttracker/
73+
│ └── server/
74+
│ └── FlightTrackerApplication.java
75+
└── test/
76+
└── java/
77+
└── dev/
78+
└── luismachadoreis/
79+
└── flighttracker/
80+
└── server/
81+
└── FlightTrackerApplicationTests.java
82+
```
83+
84+
## License
85+
86+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

pom.xml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>org.springframework.boot</groupId>
8+
<artifactId>spring-boot-starter-parent</artifactId>
9+
<version>3.4.4</version>
10+
<relativePath/>
11+
</parent>
12+
13+
<groupId>dev.luismachadoreis.flighttracker</groupId>
14+
<artifactId>flight-tracker-event-server</artifactId>
15+
<version>0.0.1-SNAPSHOT</version>
16+
<name>flight-tracker-event-server</name>
17+
<description>Flight Tracker Event Server</description>
18+
19+
<properties>
20+
<java.version>21</java.version>
21+
<jacoco.version>0.8.11</jacoco.version>
22+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
23+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
24+
<jacoco.coverage.minimum>0.00</jacoco.coverage.minimum>
25+
</properties>
26+
27+
<dependencies>
28+
<dependency>
29+
<groupId>org.springframework.boot</groupId>
30+
<artifactId>spring-boot-starter-web</artifactId>
31+
</dependency>
32+
33+
<dependency>
34+
<groupId>org.springframework.boot</groupId>
35+
<artifactId>spring-boot-starter-test</artifactId>
36+
<scope>test</scope>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.projectlombok</groupId>
41+
<artifactId>lombok</artifactId>
42+
<optional>true</optional>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.springframework.boot</groupId>
50+
<artifactId>spring-boot-maven-plugin</artifactId>
51+
<configuration>
52+
<excludes>
53+
<exclude>
54+
<groupId>org.projectlombok</groupId>
55+
<artifactId>lombok</artifactId>
56+
</exclude>
57+
</excludes>
58+
</configuration>
59+
</plugin>
60+
61+
<plugin>
62+
<groupId>org.jacoco</groupId>
63+
<artifactId>jacoco-maven-plugin</artifactId>
64+
<version>${jacoco.version}</version>
65+
<executions>
66+
<execution>
67+
<id>prepare-agent</id>
68+
<goals>
69+
<goal>prepare-agent</goal>
70+
</goals>
71+
</execution>
72+
<execution>
73+
<id>report</id>
74+
<phase>test</phase>
75+
<goals>
76+
<goal>report</goal>
77+
</goals>
78+
</execution>
79+
<execution>
80+
<id>check</id>
81+
<goals>
82+
<goal>check</goal>
83+
</goals>
84+
<configuration>
85+
<rules>
86+
<rule>
87+
<element>BUNDLE</element>
88+
<limits>
89+
<limit>
90+
<counter>LINE</counter>
91+
<value>COVEREDRATIO</value>
92+
<minimum>${jacoco.coverage.minimum}</minimum>
93+
</limit>
94+
</limits>
95+
</rule>
96+
</rules>
97+
</configuration>
98+
</execution>
99+
</executions>
100+
</plugin>
101+
</plugins>
102+
</build>
103+
</project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package dev.luismachadoreis.flighttracker.server;
2+
3+
import org.springframework.boot.SpringApplication;
4+
import org.springframework.boot.autoconfigure.SpringBootApplication;
5+
6+
@SpringBootApplication
7+
public class FlightTrackerApplication {
8+
public static void main(String[] args) {
9+
SpringApplication.run(FlightTrackerApplication.class, args);
10+
}
11+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package dev.luismachadoreis.flighttracker.server;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.springframework.boot.test.context.SpringBootTest;
5+
6+
@SpringBootTest
7+
class FlightTrackerApplicationTests {
8+
9+
@Test
10+
void contextLoads() {
11+
}
12+
}

0 commit comments

Comments
 (0)