-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #207 from trydofor/develop
🐲 Happy Loooong Year 🐉
- Loading branch information
Showing
68 changed files
with
472 additions
and
390 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,11 @@ on: | |
- INFO | ||
- WARN | ||
- ERROR | ||
applyQodanaScan: | ||
description: 'apply Qodana Scan?' | ||
default: true | ||
type: boolean | ||
required: false | ||
deployOssrh: | ||
description: 'deploy to ossrh?' | ||
default: true | ||
|
@@ -42,6 +47,10 @@ jobs: | |
release: | ||
name: Release to Sonatype | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: write | ||
env: | ||
MAVEN_OPTS: -Xmx2g | ||
LOG_LEVEL: ${{ inputs.testLoggerLevel || 'INFO' }} | ||
|
@@ -73,31 +82,43 @@ jobs: | |
- name: Maven settings.xml | ||
id: settings | ||
run: | | ||
echo "# env and var" >> "$GITHUB_STEP_SUMMARY" | ||
echo "" >> "$GITHUB_STEP_SUMMARY" | ||
JAVA_HOME=$(asdf where java) | ||
echo "- JAVA_HOME=$JAVA_HOME" >> "$GITHUB_STEP_SUMMARY" | ||
echo "JAVA_HOME=$JAVA_HOME" >> "$GITHUB_OUTPUT" | ||
echo "- GIT_BRANCH=$(git branch --show-current)" >> "$GITHUB_STEP_SUMMARY" | ||
echo "GIT_BRANCH=$(git branch --show-current)" >> "$GITHUB_OUTPUT" | ||
_opt=$(git describe --tags --exact-match 2>/dev/null || true) | ||
if [ "$_opt" != "" ]; then | ||
_opt="-Drevision=$_opt" | ||
echo "MVN_REVISION=$_opt" | ||
echo "- MVN_REVISION=$_opt" >> "$GITHUB_STEP_SUMMARY" | ||
echo "MVN_REVISION=$_opt" >> "$GITHUB_OUTPUT" | ||
fi | ||
_ver=$(mvn --quiet --non-recursive -DforceStdout -Dexpression=project.version $_opt help:evaluate) | ||
echo "WINGS_VERSION=$_ver" | ||
echo "- WINGS_VERSION=$_ver" >> "$GITHUB_STEP_SUMMARY" | ||
echo "WINGS_VERSION=$_ver" >> "$GITHUB_OUTPUT" | ||
_cov=${{ inputs.testCoverReport || github.event_name == 'push' }} | ||
echo "MVN_COVERAGE=$_cov" | ||
echo "- MVN_COVERAGE=$_cov" >> "$GITHUB_STEP_SUMMARY" | ||
echo "MVN_COVERAGE=$_cov" >> "$GITHUB_OUTPUT" | ||
_drh=${{ inputs.deployOssrh || github.event_name == 'release' }} | ||
echo "MVN_DEPLOYRH=$_drh" | ||
echo "- MVN_DEPLOYRH=$_drh" >> "$GITHUB_STEP_SUMMARY" | ||
echo "MVN_DEPLOYRH=$_drh" >> "$GITHUB_OUTPUT" | ||
mvn -v | ||
git --no-pager log --graph -10 --pretty=format:'%H - %ai %d %s' | ||
_qod=${{ inputs.applyQodanaScan || 'false' }} | ||
echo "- QODANA_SCAN=$_qod" >> "$GITHUB_STEP_SUMMARY" | ||
echo "QODANA_SCAN=$_qod" >> "$GITHUB_OUTPUT" | ||
echo "# mvn and git" >> "$GITHUB_STEP_SUMMARY" | ||
echo "" >> "$GITHUB_STEP_SUMMARY" | ||
echo '```text' >> "$GITHUB_STEP_SUMMARY" | ||
mvn -v >> "$GITHUB_STEP_SUMMARY" | ||
git --no-pager log --graph -10 --pretty=format:'%H - %ai %d %s' >> "$GITHUB_STEP_SUMMARY" | ||
echo '```' >> "$GITHUB_STEP_SUMMARY" | ||
mkdir -p ~/.m2 | ||
cat > ~/.m2/settings.xml << "EOF" | ||
|
@@ -112,16 +133,20 @@ jobs: | |
</servers> | ||
</settings> | ||
EOF | ||
- name: Qodana Scan | ||
uses: JetBrains/[email protected] | ||
if: steps.settings.outputs.QODANA_SCAN == 'true' | ||
env: | ||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | ||
## report if not release | ||
- name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }} | ||
if: steps.settings.outputs.MVN_COVERAGE == 'true' | ||
run: | | ||
mvn -P '!example,!devs' -Dmaven.test.skip=true clean install | ||
mvn -pl ':devs-codegen' -Ddevs-initdb=true clean test | ||
mvn -P 'coverage,!example,!devs' -Dmaven.test.failure.ignore=$TESTFAILS_IGNORE test | ||
mvn -pl ':devs-coverage' -am jacoco:report-aggregate | ||
mvn -pl ':devs-coverage' -DrepoToken=$COVERALLS_WINGS -DdryRun=$COVERALLS_DRYRUN verify | ||
mvn -P 'coverage' -pl ':devs-coverage' -am jacoco:report-aggregate | ||
mvn -pl ':devs-coverage' -DrepoToken=$COVERALLS_WINGS -DdryRun=$COVERALLS_DRYRUN -Dwings.rootdir=../.. coveralls:report | ||
env: | ||
TZ: Asia/Shanghai | ||
JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }} | ||
|
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
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
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
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
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
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
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
Oops, something went wrong.