Build on branch MARP-60-Git-Hub-Actions-Build-for-Market-repo-to-build-and-test-artifact triggered by tutn-axonivy #16
Workflow file for this run
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: CI Build | |
run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} | |
on: | |
push: | |
branches: | |
- MARP-60-Git-Hub-Actions-Build-for-Market-repo-to-build-and-test-artifact | |
jobs: | |
validate: | |
runs-on: [market-runner] | |
steps: | |
- name: Checkout current branch | |
uses: actions/checkout@v4 | |
- name: Editor checker | |
uses: editorconfig-checker/action-editorconfig-checker@main | |
- run: editorconfig-checker -verbose --no-color | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "21" | |
- name: Build project | |
run: | | |
cd market-test | |
mvn compile exec:java -Dexec.mainClass="com.axonivy.market.CreateBundle" -Dmaven.plugin.validation=none -Duser.home=/tmp | |
mvn verify -P json.schema -Dmaven.plugin.validation=none -Duser.home=/tmp | |
- name: Public test report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() | |
with: | |
report_paths: "**/target/surefire-reports/**/*.xml" | |
# - name: Public test report | |
# uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
# if: always() | |
# with: | |
# files: "**/target/surefire-reports/**/*.xml" | |
- name: Archive build artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: | | |
**/target/schema/market/*/*.json | |
- name: Deploy | |
shell: sh | |
run: | | |
targetFolder="/home/axonivya/deployment/market-$(date +'%Y-%m-%d_%H-%M-%S')" | |
mkdir ${targetFoler} | |
cp market-test/target/market {$targetFoler} | |
ln -fns ${targetFolder}/market /home/axonivya/data/market |