Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 161 additions & 27 deletions .github/workflows/build-cucumber.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,88 @@ permissions:
contents: read

jobs:
verify:
build-core:
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
fetch-tags: true

- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '21'
distribution: 'zulu'

- name: Cache Gradle dependencies
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
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@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
validate-wrappers: true

- name: Build Avro Java SDK
run: ./gradlew --no-daemon :fineract-avro-schemas:buildJavaSdk -x test -x cucumber -x doc

- name: Compile Fineract Provider
run: ./gradlew --no-daemon :fineract-provider:compileJava -x test -x cucumber -x doc -x buildJavaSdk

- name: Build Fineract Client Java SDK
run: ./gradlew --no-daemon :fineract-client:buildJavaSdk -x test -x cucumber -x doc

- name: Build Fineract Client Feign Java SDK
run: ./gradlew --no-daemon :fineract-client-feign:buildJavaSdk -x test -x cucumber -x doc

- name: Build Fineract
run: ./gradlew --no-daemon build -x test -x cucumber -x doc

- name: Save compiled Fineract
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}

- name: Archive test results
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: test-results-build-core
path: '**/build/reports/'
if-no-files-found: ignore
retention-days: 5

- name: Archive server logs
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: server-logs-build-core
path: '**/build/cargo/'
retention-days: 5

cucumber:
needs: build-core
runs-on: ubuntu-24.04
timeout-minutes: 60

env:
TZ: Asia/Kolkata
Expand All @@ -46,27 +114,93 @@ jobs:
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}

- name: Restore compiled Fineract
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true

- name: Setup Gradle and Validate Wrapper
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
validate-wrappers: true

- name: Run Gradle Task
if: matrix.job_type == 'main'
run: |
set -e # Fail the script if any command fails
- name: Run Cucumber
run: ./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

- name: Archive test results
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: test-results-cucumber
path: '**/build/reports/'
if-no-files-found: ignore
retention-days: 5

- name: Archive server logs
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: server-logs-cucumber
path: '**/build/cargo/'
retention-days: 5

build-progressive-loan:
needs: build-core
runs-on: ubuntu-24.04
timeout-minutes: 60

env:
TZ: Asia/Kolkata
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}

steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
fetch-tags: true

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: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '21'
distribution: 'zulu'

- name: Cache Gradle dependencies
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}

- name: Restore compiled Fineract
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.run_id }}-${{ github.run_attempt }}
fail-on-cache-miss: true

- name: Setup Gradle and Validate Wrapper
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
validate-wrappers: true

- 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
Expand All @@ -89,15 +223,15 @@ jobs:
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: test-results-${{ matrix.task }}
name: test-results-build-progressive-loan
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()
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: progressive-loan-jar
Expand All @@ -109,6 +243,6 @@ jobs:
if: always()
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: server-logs-${{ matrix.task }}
name: server-logs-build-progressive-loan
path: '**/build/cargo/'
retention-days: 5
22 changes: 21 additions & 1 deletion .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Fineract Docker Builds

on: [push, pull_request]
on:
workflow_run:
workflows:
- Fineract Build & Cucumber tests (without E2E tests)
types:
- completed

permissions:
contents: read

jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.event != 'pull_request' || github.event.workflow_run.pull_requests[0].head.repo.full_name == github.repository) }}
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
Expand All @@ -28,6 +34,7 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.workflow_run.event == 'pull_request' && format('refs/pull/{0}/merge', github.event.workflow_run.pull_requests[0].number) || github.event.workflow_run.head_sha }}
fetch-depth: 0

- name: Set up JDK 21
Expand All @@ -36,6 +43,19 @@ jobs:
java-version: '21'
distribution: 'zulu'

- name: Restore compiled Fineract
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
fail-on-cache-miss: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2

Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/build-documentation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Fineract Documentation build
on: [push, pull_request]
on:
workflow_run:
workflows:
- Fineract Build & Cucumber tests (without E2E tests)
types:
- completed
permissions:
contents: read
jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.event != 'pull_request' || github.event.workflow_run.pull_requests[0].head.repo.full_name == github.repository) }}
runs-on: ubuntu-24.04
timeout-minutes: 60
env:
Expand All @@ -12,12 +18,25 @@ jobs:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.workflow_run.event == 'pull_request' && format('refs/pull/{0}/merge', github.event.workflow_run.pull_requests[0].number) || github.event.workflow_run.head_sha }}
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
with:
java-version: '21'
distribution: 'zulu'
- name: Restore compiled Fineract
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
fail-on-cache-miss: true
- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
Expand Down
22 changes: 21 additions & 1 deletion .github/workflows/build-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Fineract E2E Tests

on: [push, pull_request]
on:
workflow_run:
workflows:
- Fineract Build & Cucumber tests (without E2E tests)
types:
- completed

permissions:
contents: read

jobs:
test:
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.event != 'pull_request' || github.event.workflow_run.pull_requests[0].head.repo.full_name == github.repository) }}
name: E2E Tests (Shard ${{ matrix.shard_index }} of ${{ matrix.total_shards }})
runs-on: ubuntu-24.04
timeout-minutes: 60
Expand Down Expand Up @@ -35,6 +41,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ github.event.workflow_run.event == 'pull_request' && format('refs/pull/{0}/merge', github.event.workflow_run.pull_requests[0].number) || github.event.workflow_run.head_sha }}
fetch-depth: 0

- name: Set up JDK 21
Expand All @@ -43,6 +50,19 @@ jobs:
java-version: '21'
distribution: 'zulu'

- name: Restore compiled Fineract
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
.gradle
**/build/classes
**/build/generated
**/build/libs
**/build/resources
**/build/tmp
key: fineract-compiled-${{ runner.os }}-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
fail-on-cache-miss: true

- name: Setup Gradle
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2

Expand Down
Loading
Loading