Skip to content

Commit

Permalink
Add GitHub Actions workflow to build and test Java project (#21)
Browse files Browse the repository at this point in the history
* Add GitHub Actions workflow to build and test Java project
  • Loading branch information
ppicazo authored Oct 29, 2024
1 parent 0dde1a8 commit 237bf76
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 7 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Java CI with Maven

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn clean install -Dgpg.skip=true

- name: Run unit tests
run: mvn test
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# jHam, Java Ham Radio Library
[![Build Status](https://github.com/Smerty/jham/actions/workflows/maven.yml/badge.svg)](https://github.com/Smerty/jham/actions)

Collection of utilities related to amateur radio.

## Using with Maven
<dependency>
<groupId>org.smerty</groupId>
<artifactId>jham</artifactId>
<version>1.0</version>
</dependency>
</dependency>

## Automated Build Process
This project uses GitHub Actions for continuous integration. The build process is triggered on push and pull request events for the `main` branch. The workflow file is located at `.github/workflows/maven.yml`.
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
Expand All @@ -58,6 +58,9 @@
</goals>
</execution>
</executions>
<configuration>
<additionalJOption>-Xdoclint:none</additionalJOption>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/smerty/jham/Angle.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Allow for easy use of angles without messy conversions to and from degrees
* and radians.
*
* @author Paul Picazo <[email protected]>
* @author Paul Picazo &lt;[email protected]&gt;
*
*/
public class Angle {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/smerty/jham/Latitude.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Latitude.
*
* @author Paul Picazo <[email protected]>
* @author Paul Picazo &lt;[email protected]&gt;
*
*/
public class Latitude extends Angle {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/smerty/jham/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* "Conversion Between Geodetic and Grid Locator Systems" by Edmund T. Tyson,
* N5JTY in QST January 1989, pp. 29-30, 43
*
* @author Paul Picazo <[email protected]>
* @author Paul Picazo &lt;[email protected]&gt;
*
*/
public class Location {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/smerty/jham/Longitude.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Longitude.
*
* @author Paul Picazo <[email protected]>
* @author Paul Picazo &lt;[email protected]&gt;
*
*/
public class Longitude extends Angle {
Expand Down

0 comments on commit 237bf76

Please sign in to comment.