56 lines
1.7 KiB
YAML
56 lines
1.7 KiB
YAML
name: Fineract Docker Builds
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
db_type: [mariadb, postgresql]
|
|
include:
|
|
- db_type: mariadb
|
|
compose_file: docker-compose.yml
|
|
check_worker_health: true
|
|
- db_type: postgresql
|
|
compose_file: docker-compose-postgresql.yml
|
|
check_worker_health: false
|
|
|
|
env:
|
|
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
|
|
IMAGE_NAME: fineract
|
|
|
|
steps:
|
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'zulu'
|
|
|
|
- name: Setup Gradle
|
|
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
|
|
|
- name: Build the image
|
|
run: ./gradlew --no-daemon --console=plain :fineract-provider:jibDockerBuild -Djib.to.image=$IMAGE_NAME -x test -x cucumber
|
|
|
|
- name: Start the ${{ matrix.db_type }} stack
|
|
run: docker compose -f ${{ matrix.compose_file }} up -d
|
|
|
|
- name: Check the stack
|
|
run: docker ps
|
|
|
|
- name: Check health Manager
|
|
run: curl -f -k --retry 60 --retry-all-errors --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/health
|
|
|
|
- name: Check info Manager
|
|
run: (( $(curl -f -k --retry 5 --retry-all-errors --connect-timeout 30 --retry-delay 30 https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 ))
|