Skip to content

Commit

Permalink
Added GitHub Actions
Browse files Browse the repository at this point in the history
- Added Jacoco report GitHub Action
- Added Maven compile and run test Github Action
  • Loading branch information
LauroSilveira committed Oct 25, 2023
1 parent 76c54ce commit 3520120
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI Workflow
run-name: ${{ github.actor }} has started workflow
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
## Set up to use JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven

## Build and execute every test
- name: Build and test with Maven
run: mvn -B package --file pom.xml

## Generate Test Report Summary
- name: Test Report
uses: dorny/[email protected]
if: always()
with:
name: Test Reporter Summary
path: target/surefire-reports/*.xml
reporter: java-junit

## Jacoco report
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/target/site/jacoco/jacoco.xml,
token: ${{ secrets.SECRET_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60

0 comments on commit 3520120

Please sign in to comment.