Skip to content

CI-Build

CI-Build #780

Workflow file for this run

name: CI-Build
on:
push:
schedule:
- cron: '21 21 * * *'
workflow_dispatch:
workflow_call:
inputs:
mvnArgs:
type: string
default: '-Divy.engine.download.url=https://dev.axonivy.com/permalink/nightly-10/axonivy-engine.zip'
required: false
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Decide to deploy or not
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ contains('refs/heads/master refs/heads/release/', github.ref) }}
if_false: "deploy -DaltSnapshotDeploymentRepository=nexus.axonivy.com::https://nexus.axonivy.com/repository/maven-snapshots/"
if_true: verify
- name: Provide maven repository credentials
uses: s4u/maven-settings-action@v2.8.0
with:
servers: |
[{
"id": "nexus.axonivy.com",
"username": "${{ secrets.NEXUS_AXONIVY_COM_USER }}",
"password": "${{ secrets.NEXUS_AXONIVY_COM_PASSWORD }}"
}]
- name: Build with Maven
run: mvn clean ${{ steps.condval.outputs.value }} --batch-mode ${{ inputs.mvnArgs }}
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: |
*/target/*-reports/*.xml
!*/target/*-reports/failsafe-summary.xml
- name: Archive build artifact
uses: actions/upload-artifact@v3
with:
path: |
*/target/*.iar
*product/target/*.zip
- name: Archive test reports
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-reports
retention-days: 5
path: |
*/target/testEngineOut.log
*/target/selenide/*
*/target/ivyEngine/deploy/*/*.deploymentLog