Skip to content

Commit f4ee922

Browse files
Update build git actions (#15)
* Update git actions * Create maven-merge-build * Update maven-pr-build.yml
1 parent 0e2fc86 commit f4ee922

File tree

2 files changed

+39
-4
lines changed

2 files changed

+39
-4
lines changed

.github/workflows/maven-build.yml renamed to .github/workflows/maven-merge-build

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ name: Java CI with Maven
1111
on:
1212
push:
1313
branches: [ "master" ]
14-
pull_request:
15-
branches: [ "master" ]
1614

1715
jobs:
1816
build:
@@ -28,10 +26,10 @@ jobs:
2826
cache: maven
2927
- name: Build with Maven
3028
run: mvn -B package --file pom.xml
31-
29+
(*
3230
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
3331
- name: Update dependency graph
34-
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
32+
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 *)
3533

3634
- name: Generate JaCoCo Badge
3735
id: jacoco

.github/workflows/maven-pr-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
pull_request:
13+
branches: [ "master" ]
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up JDK 11 for x64
21+
uses: actions/setup-java@v3
22+
with:
23+
java-version: '11'
24+
distribution: 'adopt'
25+
architecture: x64
26+
cache: maven
27+
- name: Build with Maven
28+
run: mvn -B package --file pom.xml
29+
- name: Log coverage percentage
30+
run: |
31+
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
32+
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
33+
- name: Upload JaCoCo coverage report
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: jacoco-report
37+
path: target/site/jacoco/

0 commit comments

Comments
 (0)