[plugins/asyncapi-spring-cloud-streams3] adds support for `modelNameP… #334
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
jacoco-csv-file: > | |
./plugins/asyncapi-spring-cloud-streams3/target/site/jacoco/jacoco.csv | |
./plugins/java-to-jdl/target/site/jacoco/jacoco.csv | |
./plugins/backend-application-default/target/site/jacoco/jacoco.csv | |
./plugins/openapi-controllers/target/site/jacoco/jacoco.csv | |
./plugins/zdl-to-openapi/target/site/jacoco/jacoco.csv | |
./plugins/jdl-to-asyncapi/target/site/jacoco/jacoco.csv | |
./plugins/zdl-to-asyncapi/target/site/jacoco/jacoco.csv | |
./plugins/zdl-to-markdown/target/site/jacoco/jacoco.csv | |
./plugins/openapi-spring-webtestclient/target/site/jacoco/jacoco.csv | |
./plugins/openapi-karate/target/site/jacoco/jacoco.csv | |
./zenwave-sdk-cli/target/site/jacoco/jacoco.csv | |
- 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 }} | |