Files
cbsnexora-backend/.github/workflows/build-cucumber.yml
T
dependabot[bot]andArnold Gálovics 331a762a38 Bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...330a01c490aca151604b8cf639adc76d48f6c5d4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-28 07:54:41 +01:00

115 lines
3.9 KiB
YAML

name: Fineract Build & Cucumber tests (without E2E tests)
on: [push, pull_request]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- task: build-core
job_type: main
- task: cucumber
job_type: main
- task: build-progressive-loan
job_type: progressive-loan
env:
TZ: Asia/Kolkata
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
with:
fetch-depth: 0
fetch-tags: true
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5
with:
java-version: '21'
distribution: 'zulu'
- name: Cache Gradle dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Setup Gradle and Validate Wrapper
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
with:
validate-wrappers: true
- name: Run Gradle Task
if: matrix.job_type == 'main'
run: |
set -e # Fail the script if any command fails
case "${{ matrix.task }}" in
build-core)
./gradlew --no-daemon build -x test -x cucumber -x doc
;;
cucumber)
./gradlew --no-daemon cucumber -x :fineract-e2e-tests-runner:cucumber -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x spotlessCheck -x spotlessApply -x spotbugsMain -x spotbugsTest -x javadoc -x javadocJar -x modernizer
;;
esac
- name: Build and Test Progressive Loan
if: matrix.job_type == 'progressive-loan'
run: |
# Build the JAR
./gradlew --no-daemon --console=plain :fineract-progressive-loan-embeddable-schedule-generator:shadowJar
# Store the JAR filename in an environment variable
EMBEDDABLE_JAR_FILE=$(ls fineract-progressive-loan-embeddable-schedule-generator/build/libs/*-all.jar | head -n 1)
echo "EMBEDDABLE_JAR_FILE=$EMBEDDABLE_JAR_FILE" >> $GITHUB_ENV
echo "JAR file: $EMBEDDABLE_JAR_FILE"
# Run unit tests
./gradlew --no-daemon --console=plain :fineract-progressive-loan-embeddable-schedule-generator:test
# Build and run sample application
mkdir -p sample-app
javac -cp "$EMBEDDABLE_JAR_FILE" -d sample-app fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java
java -cp "$EMBEDDABLE_JAR_FILE:sample-app" Main
java -cp "$EMBEDDABLE_JAR_FILE:sample-app" Main 25
- name: Archive test results
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4
with:
name: test-results-${{ matrix.task }}
path: |
**/build/reports/
**/fineract-progressive-loan-embeddable-schedule-generator/build/reports/
if-no-files-found: ignore
retention-days: 5
- name: Archive Progressive Loan JAR
if: matrix.job_type == 'progressive-loan' && always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4
with:
name: progressive-loan-jar
path: ${{ env.EMBEDDABLE_JAR_FILE }}
retention-days: 5
if-no-files-found: ignore
- name: Archive server logs
if: always()
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v4
with:
name: server-logs-${{ matrix.task }}
path: '**/build/cargo/'
retention-days: 5