|
| 1 | +name: Fineract Liquibase Only mode - PostgreSQL |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +permissions: |
| 6 | + contents: read |
| 7 | + |
| 8 | +jobs: |
| 9 | + test: |
| 10 | + runs-on: ubuntu-22.04 |
| 11 | + timeout-minutes: 60 |
| 12 | + |
| 13 | + services: |
| 14 | + postgresql: |
| 15 | + image: postgres:17.4 |
| 16 | + ports: |
| 17 | + - 5432:5432 |
| 18 | + env: |
| 19 | + POSTGRES_USER: root |
| 20 | + POSTGRES_PASSWORD: postgres |
| 21 | + options: --health-cmd="pg_isready -q -d postgres -U root" --health-interval=5s --health-timeout=2s --health-retries=3 |
| 22 | + |
| 23 | + env: |
| 24 | + TZ: Asia/Kolkata |
| 25 | + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Checkout |
| 29 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + fetch-tags: true |
| 33 | + |
| 34 | + - name: Set up JDK 21 |
| 35 | + uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5 |
| 36 | + with: |
| 37 | + java-version: '21' |
| 38 | + distribution: 'zulu' |
| 39 | + |
| 40 | + - name: Cache Gradle dependencies |
| 41 | + uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 |
| 42 | + with: |
| 43 | + path: | |
| 44 | + ~/.gradle/caches |
| 45 | + ~/.gradle/wrapper |
| 46 | + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 47 | + |
| 48 | + - name: Setup Gradle and Validate Wrapper |
| 49 | + uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 |
| 50 | + with: |
| 51 | + validate-wrappers: true |
| 52 | + |
| 53 | + - name: Verify PostgreSQL connection |
| 54 | + run: | |
| 55 | + while ! pg_isready -d postgres -U root -h 127.0.0.1 -p 5432 ; do |
| 56 | + sleep 1 |
| 57 | + done |
| 58 | +
|
| 59 | + - name: Initialise databases |
| 60 | + run: | |
| 61 | + ./gradlew --no-daemon -q createPGDB -PdbName=fineract_tenants |
| 62 | + ./gradlew --no-daemon -q createPGDB -PdbName=fineract_default |
| 63 | +
|
| 64 | + - name: Run Fineract in Liquibase only mode |
| 65 | + env: |
| 66 | + FINERACT_DEFAULT_TENANTDB_CONN_PARAMS: "" |
| 67 | + FINERACT_DEFAULT_TENANTDB_DESCRIPTION: "Default Demo Tenant" |
| 68 | + FINERACT_DEFAULT_TENANTDB_HOSTNAME: "localhost" |
| 69 | + FINERACT_DEFAULT_TENANTDB_IDENTIFIER: "default" |
| 70 | + FINERACT_DEFAULT_TENANTDB_NAME: "fineract_default" |
| 71 | + FINERACT_DEFAULT_TENANTDB_PORT: "5432" |
| 72 | + FINERACT_DEFAULT_TENANTDB_PWD: "postgres" |
| 73 | + FINERACT_DEFAULT_TENANTDB_TIMEZONE: "Asia/Kolkata" |
| 74 | + FINERACT_DEFAULT_TENANTDB_UID: "root" |
| 75 | + FINERACT_HIKARI_DRIVER_SOURCE_CLASS_NAME: "org.postgresql.Driver" |
| 76 | + FINERACT_HIKARI_JDBC_URL: "jdbc:postgresql://localhost:5432/fineract_tenants" |
| 77 | + FINERACT_HIKARI_PASSWORD: "postgres" |
| 78 | + FINERACT_HIKARI_USERNAME: "root" |
| 79 | + SPRING_PROFILES_ACTIVE: "liquibase-only" |
| 80 | + run: |
| 81 | + ./gradlew fineract-provider:bootRun |
0 commit comments