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

Jacoco Coverage in CI #1375

Merged
merged 5 commits into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Java CI

on:
push:
pull_request:

jobs:
build:
Expand All @@ -14,22 +14,25 @@ jobs:
uses: actions/setup-java@v3

with:
java-version: '11'
distribution: 'adopt'
java-version: "11"
distribution: "adopt"
# NEATO ! CACHE !!!!
cache: 'maven'
cache: "maven"

- name: Dependency Test
- name: Install Missing Dependencies
run: sudo apt-get install -y libv4l-0 libopencv-dev python3-opencv

- name: Dependency Test # installs all dependencies
run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q
- name: Build with Maven
run: mvn --batch-mode -Dtest=!**/OpenCV* test -q
- name: Build with Maven # currently cannot test opencv
run: mvn clean test surefire-report:report jacoco:report -q

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
increment: patch

- name: Package with Maven
run: "mvn package -DskipTests -Dversion=${{ steps.version.outputs.version }} -q"
Expand All @@ -52,6 +55,21 @@ jobs:
generate_release_notes: true
body_path: ./release-template.md

# - name: Publish Test Report
# if: success() || failure()
# uses: scacap/action-surefire-report@v1

- name: Add Coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: |
${{ github.workspace }}/target/site/jacoco/jacoco.xml
token: ${{ secrets.ACCESS_TOKEN }}
debug-mode: true
min-coverage-overall: 40
min-coverage-changed-files: 60

- name: Release
if: github.ref == 'refs/heads/develop'
id: release
Expand All @@ -63,4 +81,3 @@ jobs:
tag_name: ${{ steps.version.outputs.version }}
generate_release_notes: true
body_path: ./release-template.md

48 changes: 37 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
{
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/target": true
},
"files.associations": {
"cstddef": "cpp"
{ "files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true,
"**/target": true
},
"files.associations": {
"cstddef": "cpp"
},
"terminal.integrated.scrollback": 9999,
"jest.rootPath": "app",
"jest.jestCommandLine": "npx jest --runInBand --verbose",
"jest.autoRun": "off",
"jest.monitorLongRun": 120000,
"jest.showCoverageOnLoad": false,
"jest.coverageFormatter": "GutterFormatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"typescript.tsdk": "./app/node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.tabSize": 2,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
}

Loading
Loading