Skip to content

adding the workflow for CI #2

adding the workflow for CI

adding the workflow for CI #2

Workflow file for this run

name: Java CI with Maven and CodeCov
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven and run tests
run: mvn -B clean test
- name: Generate Site with Reports
run: mvn -B site:site -DskipTests -N
- name: Run JaCoCo Report Aggregate
run: mvn -B jacoco:report-aggregate -DskipTests
- name: Debug - Check JaCoCo Report Location
run: |
echo "Checking for JaCoCo reports..."
find ./target -name "*.xml" | grep jacoco || echo "No JaCoCo XML reports found"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
continue-on-error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: false
directory: ./target/site/jacoco-aggregate/
flags: unittests
verbose: true