Skip to content

adds "serviceName" and fixes "entities" type. #19

adds "serviceName" and fixes "entities" type.

adds "serviceName" and fixes "entities" type. #19

Workflow file for this run

name: Build
on:
push:
branches: [ develop, next ]
# pull_request:
# branches: [ '**' ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up the Java JDK
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build and Publish SNAPSHOT to the Maven Central
if: ${{ github.event_name == 'push' }}
run: mvn -B verify deploy -DdeployAtEnd=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SIGN_KEY: ${{ secrets.SIGN_KEY }}
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }}
# - name: Build and Verify
# if: ${{ github.event_name == 'pull_request' }}
# run: mvn -B verify
- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
badges-directory: badges
generate-branches-badge: true
generate-summary: true
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Comment on PR with coverage percentages
if: ${{ github.event_name == 'pull_request' }}
run: |
REPORT=$(<badges/zenwave-sdk-cli/coverage-summary.json)
COVERAGE=$(jq -r '.coverage' <<< "$REPORT")%
BRANCHES=$(jq -r '.branches' <<< "$REPORT")%
NEWLINE=$'\n'
BODY="## JaCoCo Test Coverage Summary Statistics (zenwave-sdk-cli)${NEWLINE}* __Coverage:__ ${COVERAGE}${NEWLINE}* __Branches:__ ${BRANCHES}"
gh pr comment ${{github.event.pull_request.number}} -b "${BODY}"
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}