Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/junit #34

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
33 changes: 33 additions & 0 deletions .github/workflows/jacoco
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Jacoco Coverage

on:
pull_request:
branches: [ feature/version/upgrade ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '17'

- name: Build with Maven
run: mvn clean verify

- name: Upload Jacoco Report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: target/site/jacoco

- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./target/site/jacoco/index.html
39 changes: 39 additions & 0 deletions .github/workflows/jacoco-1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: jacoco-1

on:
push:
branches: [ "feature/Junit"]
paths-ignore:
- 'target/**'
pull_request:
branches: [ "feature/Junit" ]
paths-ignore:
- 'target/**'

env:
ENV_VAR: test

jobs:
Package-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'adopt'

- name: Build with Maven
run: mvn clean install -DENV_VAR=test

- 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: target/site/jacoco/
Loading