diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index 41846eaa8..000000000 --- a/.codecov.yml +++ /dev/null @@ -1,12 +0,0 @@ -coverage: - precision: 2 - round: up - range: "30...60" - - status: - project: - default: off - patch: - default: off - changes: - default: off diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b9d4f0926..823592b74 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -18,6 +18,9 @@ concurrency: jobs: + # build + ############################################################################# + build: strategy: fail-fast: true @@ -44,6 +47,18 @@ jobs: name: build_${{ matrix.runner }} retention-days: 1 path: coatjava.tar.gz + - name: collect jacoco report + if: ${{ matrix.runner == 'ubuntu-latest' }} + run: validation/jacoco-aggregate.sh + - name: publish jacoco report + if: ${{ matrix.runner == 'ubuntu-latest' }} + uses: actions/upload-pages-artifact@v2 + with: + path: publish/ + retention-days: 1 + + # tests + ############################################################################# test_coatjava: needs: [ build ] @@ -119,3 +134,21 @@ jobs: steps: - name: pass run: exit 0 + + # deploy web pages + ############################################################################# + + deploy_web_pages: + if: ${{ github.event_name == 'push' }} + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: deployment + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitignore b/.gitignore index 1a1360a8f..77c0fd6ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /coatjava /myLocalMvnRepo target +/publish *.class *lundfiles*.dat @@ -36,4 +37,4 @@ hs_err_pid* *.evio bin/evio2hipotest -export.sh \ No newline at end of file +export.sh diff --git a/README.md b/README.md index e28311f4f..7dc9615ff 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # COATJAVA [![Build Status](https://github.com/jeffersonlab/coatjava/workflows/Coatjava-CI/badge.svg)](https://github.com/jeffersonlab/coatjava/actions) [![Validation Status](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml/badge.svg)](https://github.com/JeffersonLab/coatjava/actions/workflows/validation.yml) -[![codecov](https://codecov.io/gh/JeffersonLab/coatjava/branch/development/graph/badge.svg?precision=2)](https://codecov.io/gh/JeffersonLab/coatjava/branch/development) +[![Coverage](https://badgen.net/static/JaCoCo/coverage/purple)](https://jeffersonlab.github.io/coatjava) The original repository for COATJAVA was named "clas12-offline-software" and is [now archived and read-only](https://github.com/JeffersonLab/clas12-offline-software). On May 17, 2023, this new repository was created by running BFG Repo Cleaner to get rid of old, large data files and things that should never have been in the repository, giving 10x reduction in repository size, clone time, etc, and renamed `coatjava`. The most critical, GitHub-specific aspects have been transferred to this new repository: diff --git a/parent/pom.xml b/parent/pom.xml index 1612c8c67..9912e7853 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -47,6 +47,13 @@ 4.0.5 + + + org.jacoco + jacoco-maven-plugin + 0.8.10 + + @@ -59,18 +66,6 @@ - - org.codehaus.mojo - cobertura-maven-plugin - 2.7 - - - html - xml - - - - com.github.spotbugs @@ -134,6 +129,26 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.10 + + + + prepare-agent + + + + report + prepare-package + + report + + + + + diff --git a/validation/jacoco-aggregate.sh b/validation/jacoco-aggregate.sh new file mode 100755 index 000000000..07dafd5ab --- /dev/null +++ b/validation/jacoco-aggregate.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# simple script to aggregate jacoco results, until we figure out a better way + +mkdir -p publish +rm -r publish +mkdir -p publish +for d in $(find -type d -name 'jacoco'); do + target=publish/$(echo $d | sed 's;^\./;;') + mkdir -p $target + cp -r $d/* $target/ +done + +pushd publish + +cat << EOF > index.html + + +JaCoCo Coverage Summary + + +

JaCoCo Coverage Summary

+