-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90aff8a
commit f468800
Showing
1 changed file
with
25 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,39 @@ | ||
name: Jacoco Coverage | ||
name: jacoco-1 | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/Junit | ||
branches: [ "feature/Junit"] | ||
paths-ignore: | ||
- 'target/**' | ||
pull_request: | ||
branches: | ||
- feature/Junit | ||
branches: [ "feature/Junit" ] | ||
paths-ignore: | ||
- 'target/**' | ||
|
||
env: | ||
ENV_VAR: test | ||
|
||
jobs: | ||
build: | ||
Package-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK | ||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew build | ||
|
||
- name: Run tests with Jacoco | ||
run: mvn clean install | ||
|
||
- name: Upload Jacoco report | ||
java-version: 17 | ||
distribution: 'adopt' | ||
|
||
- name: Build with Maven | ||
run: mvn clean install -DENV_VAR=${{ env.ENV_VAR }} | ||
|
||
- name: Build WAR file | ||
run: mvn -B package --file pom.xml | ||
|
||
- name: Upload JaCoCo coverage report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: jacoco-report | ||
path: build/reports/jacoco/test/html | ||
path: target/site/jacoco/index.html |