Skip to content

Commit

Permalink
Create maven.yml
Browse files Browse the repository at this point in the history
feature: Added back the lost workflow for the mag Build
  • Loading branch information
lfdesousa authored May 29, 2024
1 parent 31fbd25 commit 7e5f78d
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "feature/build-tools" ]
pull_request:
branches: [ "feature/build-tools" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Generate the Jacoco report
run: mvn jacoco:report

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/[email protected]
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: target/site/jacoco/

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@v3

- name: Upload mag artifact snapshot jar
uses: actions/upload-artifact@v4
with:
name: mag-jar
path: target/mobile-access-gateway-1.0-SNAPSHOT.jar

- name: Upload mag artifact snapshot spring-boot jar
uses: actions/upload-artifact@v4
with:
name: mag-jar
path: target/mobile-access-gateway-1.0-SNAPSHOT-spring-boot.jar

0 comments on commit 7e5f78d

Please sign in to comment.