Skip to content

Commit

Permalink
Add GitHub Actions workflow to build and test Java project
Browse files Browse the repository at this point in the history
---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/Smerty/jham?shareId=XXXX-XXXX-XXXX-XXXX).
  • Loading branch information
ppicazo committed Oct 29, 2024
1 parent 0dde1a8 commit 6289070
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Java CI with Maven

on:
push:
branches:
- main
pull_request:
branches:
- main

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:
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

- 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`.

0 comments on commit 6289070

Please sign in to comment.